Forum Discussion
ajimenez
9 years agoFrequent Visitor
Bad behavior dax subtotal
i everyone, I am trying to calculate the total for the field result of the following table: Year Quarter Line Total Days Average Days Total Items % Effectiveness Result 2016 3 ACA 1...
OpenDataLab
9 years agoHelper II
You need to use SUMX(table,[Result]).
The functions ending in X are iterator, which in lay-mans terms means they will loop through the rows in the current filter context calculating the result for each row before performing the final aggregation.
- ajimenez9 years agoFrequent Visitor
Thanks for your answer, but using SUMX is the same behavior, the real problem is that it applies the calculation even in the totals, it only adds the previous records only when they come from a defined table or column, not measures, because this applies the calculation for each row.
Item Average Days % Effectiveness Result with DAX 1 128 0,05 128 * 0,05 = 6,4 2 508 0,30 508 * 0,30 = 152,4 3 994,5 0,50 994,5 * 0,50 = 497,25 4 264 0,15 264 * 0,15 = 39,6 Grand Total 473,625 1 473,625 * 1 = 473,625 Result = Table[Average Days] * Table[% Effectiveness]
I need another way to calculate this Result and being able to get the right value: 695,65
Thanks!!