Forum Discussion

sya's avatar
sya
Helper I
4 years ago
Solved

Matrix with YOY GP Margin Comparisons

Hi All,   I need to do a YoY comparison for PnL as in the picture: The original data from excel was like this:   I unpivot the data which made all the Revenue, GP, Direct SG&A, etc g...
  • v-yalanwu-msft's avatar
    4 years ago

    Hi, sya ;

    Try it.

    Measure = 
    DIVIDE(
    CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Year]=MAX('Table'[Year])&&[category]="OUP")),
    
    CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Year]=MAX('Table'[Year])&&[category]="Revenue")))

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.