Forum Discussion
Anonymous
9 years agoNot applicable
Quick Measure - Running Total Sorting issue
I am trying to create a Pareto Chart which shows the running Total of Spend in percentge as Line. The Columns are sorted by Total Spend for each category (MM, PPP, SS etc) in Desc order ...
- 9 years ago
Anonymous
Hi, Try with this Code: (Assuming that the Graph was sorted by Spend)
Spend running total = VAR spend = CALCULATE ( SUM ( Table2[Spend] ) ) RETURN CALCULATE ( SUM ( Table2[Spend] ), FILTER ( ALL ( Table2[Category] ), CALCULATE ( SUM ( Table2[Spend] ) >= spend ) ) )
Vvelarde
9 years agoCommunity Champion
Anonymous
Hi, Try with this Code: (Assuming that the Graph was sorted by Spend)
Spend running total =
VAR spend =
CALCULATE ( SUM ( Table2[Spend] ) )
RETURN
CALCULATE (
SUM ( Table2[Spend] ),
FILTER (
ALL ( Table2[Category] ),
CALCULATE ( SUM ( Table2[Spend] ) >= spend )
)
)KMcCarthy9
5 years agoHelper V
I just found this thread and it solved my problem! However, would you know why I am not getting a total? The initial Cumulative Spend column was working but it was based on an alphabetical sort, where I wanted it based on descending spend sort, which your post did. However my first one gave me a total and the new one is not. Any ideas?