Forum Discussion
Totals Row not summing properly
- 2 years ago
The simplest way to solve the "totals don't add up" problem is to replicate the structure of the rows in your visual inside the measure.
the reason you are getting the right answer in the row section is because each row is being calculated separately. At the total row, all of the data is aggregated and a single calculation is completed. You need to replicate the row by row calculation in the total.
write a new measure that references the current measure
SUMX(VALUES(Table[Column in your visual]),[reference current measure that doesn't work])
or rewrite the current measure
SUMX(VALUES(Table[Column in your visual]),CALCULATE(<all code in the current measure that doesn't work>)
The simplest way to solve the "totals don't add up" problem is to replicate the structure of the rows in your visual inside the measure.
the reason you are getting the right answer in the row section is because each row is being calculated separately. At the total row, all of the data is aggregated and a single calculation is completed. You need to replicate the row by row calculation in the total.
write a new measure that references the current measure
SUMX(VALUES(Table[Column in your visual]),[reference current measure that doesn't work])
or rewrite the current measure
SUMX(VALUES(Table[Column in your visual]),CALCULATE(<all code in the current measure that doesn't work>)
- mclawler2 years ago
Helper III
That worked!! Also so easy in hindsight 🙂
I wrote a new measure that referenced the old. I tried the rewriting method and couldn't get it to foot correctly. Thank you!!!