Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Grand Total in MATRIX

Hi

My input datset is as follows:

 

 

I've created a MATRIX report as follows:

 

MEasure is calculated as follows:

 

Measure = if(ISFILTERED('Sheet1 (2)'[Attributes] ), 'Sheet1 (2)'[value2],CALCULATE('Sheet1 (2)'[value2],'Sheet1 (2)'[Attributes]="Actual"))
 
The above MEasure calculates grand totals as sum of all actuals. My another requirements is to calculate totals in column FUM (inv option column). in fum it needs to add all variance attribute values
 
any help is appreciated
 
ara
  • Hi Anonymous ,

     

    You can write you measure like so:

    Measure = 
    IF (
        ISFILTERED ( 'Sheet1 (2)'[Attributes] ),
        'Sheet1 (2)'[value2],
        IF (
            MAX ( 'Sheet1 (2)'[invest] ) = "FUM",
            CALCULATE ( 'Sheet1 (2)'[value2], 'Sheet1 (2)'[Attributes] = "Variance" ),
            CALCULATE ( 'Sheet1 (2)'[value2], 'Sheet1 (2)'[Attributes] = "Actual" )
        )
    )
    

     

    You can check more details from here.

     

     

    Best Regards,

    Icey

     

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

2 Replies