Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Create a progressive SUM that is dependent from another column

Hi all, My problem is: I created a Table with the look of Power BI. In it, I put a column called 'Label' and a measure called 'Value' which gives me the total value. The 'Label' data and the ...
  • Nathaniel_C's avatar
    4 years ago

    Anonymous try this 

     



     

     

    Progressive sum = 
    VAR _MaxRank =
        CALCULATE ( MAX ( Rank1[Rank] ), ALL () )
    /*VAR _calc =
        CALCULATE (
            MIN ( Rank1[Amount] ),
            FILTER ( ALL ( Rank1 ), Rank1[Rank] = _MaxRank )
        )*/
    VAR _getRank =
        MAX ( Rank1[Rank] )
    VAR _rt =
        CALCULATE (
            SUM ( Rank1[Amount] ),
            FILTER ( ALL ( Rank1 ), Rank1[Rank] >= _getRank )
        )
    RETURN
        IF ( MAX ( Rank1[rank] ) = _MaxRank, "Blank()", _rt )
    

     

     


    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
    Nathaniel