Forum Discussion
ngct1112
5 years agoPost Patron
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...
- 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
amitchandak
5 years agoSuper User
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