Forum Discussion
How the grouping causes the nagative value?
- Anonymous1 year ago
Thank you for your support this case MFelix
Hi, nadia_ab
Thank you very much for asking about the matrix total. As you described, you want to change the calculation logic in the grand total to Operating Surplus/Deficit - Tax Expense. It's possible. At present, the main method is to use the isinscope or hasvalues functions in an IF judgment to determine whether the current row is a total row.
Here's a simple example:My measure:
Is detail row = ISINSCOPE('Table'[Category(Group)])Origin cal Measure = SUM('Table'[Values])Fix grand total cal = IF(ISINSCOPE('Table'[Category(Group)]),[Origin cal Measure],[Origin cal Measure]/100)Here's what they look like in the matrix:
This makes it possible to perform a separate calculation logic for the grand total row of the matrix. You can use this function and then adjust it to display the values correctly based on your actual calculations.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous, thank you for giving me ideas.
Meaning, if I want to use this approach, and i also have 3 other columns; PreviousYear, Difference and %Difference, i need to create 3 sets of new measure that corresponds for each column, right?
Hi, nadia_ab
Thank you very much for your reply. If your other measure totals are incorrect, then you need to correct your measure using the method above.
Let's take a look at SQLBI's articles to enhance your understanding of current problems and functions, which will help you find the right solution in the future when you encounter Total incorrect.
Why Power BI totals might seem wrong - SQLBI
Distinguishing HASONEVALUE from ISINSCOPE - SQLBI
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.