Forum Discussion
Incorrect Total in Matrix Visual
- 1 year ago
Hey AzadHGS ,
The issue you’re encountering with incorrect totals in your matrix visual for the BIAS and BIAS % rows is a common DAX behavior. In Power BI matrix visuals:
Total rows are not the sum of individual values you see in the matrix.
Instead, DAX re-evaluates the measure at the total level using total Plan and total Actual, not summing each row's calculated result.
That’s why you're seeing:
GSV $ BIAS (Plan vs Act) total as = 41,16,757 - 16,75,782 = 24,40,975
instead of the expected sum of individual biases.
Fix Totals Using DAX ISINSCOPE or HASONEVALUE
You can customize your BIAS measures to show summed values in totals rather than default totals using ISINSCOPE() or HASONEVALUE().
GSV $ BIAS (Plan vs Act) = IF( ISINSCOPE('DateTable'[Period]), [Plan Ship Dollar] - [Actual Ship Dollar], SUMX( VALUES('DateTable'[Period]), [Plan Ship Dollar] - [Actual Ship Dollar] ) )Or if you're using a flat model without a separate date table:
GSV $ BIAS (Plan vs Act) = IF( HASONEVALUE('YourTable'[Period]), [Plan Ship Dollar] - [Actual Ship Dollar], SUMX( VALUES('YourTable'[Period]), [Plan Ship Dollar] - [Actual Ship Dollar] ) )For detailed information:
Microsoft Learn Documentation – Understanding Totals in Power BI
SQLBI – Fix Incorrect Totals in DAX with SUMX
Radacad – Wrong Total in Matrix Visual in Power BI
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
Hey AzadHGS ,
The issue you’re encountering with incorrect totals in your matrix visual for the BIAS and BIAS % rows is a common DAX behavior. In Power BI matrix visuals:
Total rows are not the sum of individual values you see in the matrix.
Instead, DAX re-evaluates the measure at the total level using total Plan and total Actual, not summing each row's calculated result.
That’s why you're seeing:
GSV $ BIAS (Plan vs Act) total as = 41,16,757 - 16,75,782 = 24,40,975
instead of the expected sum of individual biases.
Fix Totals Using DAX ISINSCOPE or HASONEVALUE
You can customize your BIAS measures to show summed values in totals rather than default totals using ISINSCOPE() or HASONEVALUE().
GSV $ BIAS (Plan vs Act) =
IF(
ISINSCOPE('DateTable'[Period]),
[Plan Ship Dollar] - [Actual Ship Dollar],
SUMX(
VALUES('DateTable'[Period]),
[Plan Ship Dollar] - [Actual Ship Dollar]
)
)Or if you're using a flat model without a separate date table:
GSV $ BIAS (Plan vs Act) =
IF(
HASONEVALUE('YourTable'[Period]),
[Plan Ship Dollar] - [Actual Ship Dollar],
SUMX(
VALUES('YourTable'[Period]),
[Plan Ship Dollar] - [Actual Ship Dollar]
)
)
For detailed information:
Microsoft Learn Documentation – Understanding Totals in Power BI
SQLBI – Fix Incorrect Totals in DAX with SUMX
Radacad – Wrong Total in Matrix Visual in Power BI
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
Thanks Nasif_Azam , It worked !