I have been learning and thesame time carrying out a project using powerquery. I am trapped on adding column values.Some of the column values contain text.I intend to sum in each record of my table, all values with integer type.However, there is a challenge . When i add up the column values with the interger type,i get a wrong answer.Secondly, this column headers are dynamic. How do i sum effectively dynamic column headers in powerquery
Example: My Challenge: When i sum the column with interger type like this [MEC101]+[THER305] i get a null values on some records and i dont know why?
When wrapped the sum using list.sum function, it partially works ,buh whenever,one of the column headers is missing, it gives a wrong answer.I want a suituation, when a column header is missing, it will ignore the missing column headers and sum the values from the available column headers. Thank you.
| ID | MEC101 | MEC-GRADE | THER305 | THER305-GRADE | TOTAL |
|---|---|---|---|---|---|
| 1002 | 70 | A | 40 | D | |
| 1003 | 50 | C | 60 | B | |
| 1004 | 60 | B | 30 | F |
EXPECTED RESULTS 1:
| ID | MEC101 | MEC-GRADE | THER305 | THER305-GRADE | TOTAL |
|---|---|---|---|---|---|
| 1002 | 70 | A | 40 | D | 110 |
| 1003 | 50 | C | 60 | B | 110 |
| 1004 | 60 | B | 30 | F | 90 |
EXPECTED RESULTS 2:
| ID | MEC101 | MEC-GRADE | TOTAL | ||
|---|---|---|---|---|---|
| 1002 | 70 | A | 70 | ||
| 1003 | 50 | C | 50 | ||
| 1004 | 60 | B | 60 |
