Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

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 ...
  • Vvelarde's avatar
    Vvelarde
    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 )
            )
        )