Forum Discussion

ngct1112's avatar
ngct1112
Post Patron
5 years ago
Solved

Measure - Marginal different in a column

Hi, I have a measure to sum up the "Total Cost" (ASC) by its groups, may I know could I add one measure to calculate their %different comparing to upper value. Great thanks! e.g. For group 2: 2970/2...
  • amitchandak's avatar
    5 years ago

    ngct1112 , try like

    This = CALCULATE([Total Cost], FILTER(ALLSELECTED('Table'),'Table'[Group]=max('Table'[Group])))
    Last = CALCULATE([Total Cost], FILTER(ALLSELECTED('Table'),'Table'[Group]=max('Table'[Group])-1))

    diff = divide([This],[Last])-1

     

    But it will work better when group is in a separate diemenion/master table