Forum Discussion

Seabastein's avatar
Seabastein
Frequent Visitor
4 years ago
Solved

Cumulative sum on measure

Hello,   I need your help because I am struggling with a cumulative sum that isn't linked to a date.   I have a visual that looks like this: And I want to achieve what I wrote in the colum...
  • v-chenwuz-msft's avatar
    4 years ago

    Hi Seabastein ,

     

    You can use sales as index to calculate cumulative sum. Please refer this:

     

    cumulative sum = 

     

    VAR _s =
        SUMMARIZE (
            ALLSELECTED ( data ),
            [customer name],
            "_sales", SUM ( data[sales] ),
            "%", [ % of total]
        )
    RETURN
        SUMX ( FILTER ( _s, [_sales] <= SUM ( data[sales] ) ), [%] )
    

     

     

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.