Forum Discussion
Grand total error
- 1 year ago
Hi Anonymous ,
To fix this issue, you can use the SUMX function to iterate over each row and apply your logic correctly for both rows and totals.
Here’s how you can rewrite your measure:
Obj.Ratio 10 = SUMX( VALUES('YourTableName'), IF( AND([CA filtere P.T] > 600000, [Tx P.T] < 0.1), [Diff CA PT et 10%CA], 0 ) )- SUMX(): Iterates over each row in your table and applies your logic.
- VALUES('YourTableName'): Ensures it evaluates your logic row by row.
This should give you the correct Grand Total that matches the row-level calculations.
Best regards,
- 1 year ago
he formula provided by DataNinja777 should be evaluated individually for each row, meaning you will get the row value based on the current context (same as in your screenshot). However, at the total level, the formula should return the sum of all those individual row evaluations.
Hi Anonymous ,
To fix this issue, you can use the SUMX function to iterate over each row and apply your logic correctly for both rows and totals.
Here’s how you can rewrite your measure:
Obj.Ratio 10 =
SUMX(
VALUES('YourTableName'),
IF(
AND([CA filtere P.T] > 600000, [Tx P.T] < 0.1),
[Diff CA PT et 10%CA],
0
)
)
- SUMX(): Iterates over each row in your table and applies your logic.
- VALUES('YourTableName'): Ensures it evaluates your logic row by row.
This should give you the correct Grand Total that matches the row-level calculations.
Best regards,
Thank you, but how can I make this function appear in the last row of my table, replacing the grand total?
- danextian1 year ago
Super User
he formula provided by DataNinja777 should be evaluated individually for each row, meaning you will get the row value based on the current context (same as in your screenshot). However, at the total level, the formula should return the sum of all those individual row evaluations.