Forum Discussion

sprao's avatar
sprao
Helper I
6 years ago
Solved

Total Sum

Hi All,   Sorry everyone...May be for you all its basic question, but i just stareted learning i need your help..   How to sumup sales for last selection in filter,(Ex:ABC21)          ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi sprao ,

    Use below steps to achieve this,

    Measure:

    SUM_Sales = IF(SELECTEDVALUE('Table'[Year])="ABC1",CALCULATE(SUM('Sample'[Sales]),ALL('Sample'[Year])),CALCULATE(SUM('Sample'[Sales]),USERELATIONSHIP('Sample'[Year],'Table'[Year])))


    Inactive Relation:

     

     

    ABC1:

    For 2020:


    Best Regards,

    Mail2inba4

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