Forum Discussion

nadia_ab's avatar
nadia_ab
Frequent Visitor
1 year ago
Solved

How the grouping causes the nagative value?

I have a parameter called Current Year(RM), it stores decimal values. for Category I created two new groups so it become Category(group) and Category(group)(group). in Category i have value Tax Expe...
  • Anonymous's avatar
    Anonymous
    1 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.