Forum Discussion

clubspec's avatar
clubspec
Helper III
6 years ago
Solved

Simple GP display on Matrix

Hi Guru,   I have tried many different ways trying to build a simple PL with Gross Profit on a matrix but no success.  I tried using SWITCH measure to nominate the measures displaying on the matrix...
  • dax's avatar
    dax
    6 years ago

    Hi clubspec , 

    You could try below measure to get minus value.

    group mins = if(HASONEVALUE('Table'[GroupB]),CALCULATE(SUM(GL[Amount]), FILTER(GL,GL[GL]=RELATED('Table'[GL]))), CALCULATE(SUM(GL[Amount]), FILTER(GL,GL[GL]=RELATED('Table'[GL])&& RELATED('Table'[GroupB])="R"))-CALCULATE(SUM(GL[Amount]), FILTER(GL,GL[GL]=RELATED('Table'[GL])&& RELATED('Table'[GroupB])="E")))

     

    Best Regards,
    Zoe Zhi

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