Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculate (subtract) total value result in Matrix visual with another value

Sorry for making a mockup data in excel. But I have column and row total in one Matrix visual (Actuals). Would like to calculate (Subtract) data from another dataset (Forcast). And get Delta (Actuals...
  • Icey's avatar
    7 years ago

    Hi Anonymous,

    If I understand correctly, you want to get the matrix visual like the screenshot below.

    If so, you can write your measures like so:

    1. Create relationship between table ‘Actual’ and ‘Forcast’ based on Region.
    2. Create measures like so:
    Actual Row Total =
    SUMX ( Actual, Actual[Department 1] ) + SUMX ( Actual, Actual[Department 2] )
    
    Forcast Row Total =
    SUMX ( Forcast, Forcast[Department 1] )
        + SUMX ( Forcast, Forcast[Department 2] )
    
    Forcast Row Total - Actual Row Total =
    Forcast[Forcast Row Total] - Actual[Actual Row Total]

     

    Best Regards,

    Icey Zhang

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.