Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Cummulative sum in a column

Hi,
1) I have Grand Total column as below, from that i need to get % column value listed below.
Grand Total 656,306
to get 30% i need to do  197,829/656,306 = 30%
to get 13% i need to do 84,635/656,306 = 13% ....so on 

2)How can i get the cummulative sum from the %column?
1st row values remains same as 30%.
2nd row column value - 30%+13% = 43%
3rd row column value - 30+11+13 = 54% etc...

Please advise 

 

Grand Total656,306

%**bleep**
197,82930%30%
84,63513%43%
69,12811%54%
51,9328%61%
45,2107%68%
41,3356%75%
35,8155%80%
26,9624%84%
13,7812%86%
13,4172%88%
9,7521%90%
9,7501%91%
9,4561%93%
9,3781%94%
9,1111%96%
8,3941%97%
5,5771%98%
5,1911%99%
4,3731%99%
2,9760%100%
1,8240%100%
4800%100%
656,306 

9 Replies

  • Hi,

    Please check the below picture and the attached pbix file.

     

     

    Percentage measure: =
    VAR _qty =
        SUM ( Data[Quantity] )
    VAR _allqty =
        CALCULATE ( SUM ( Data[Quantity] ), REMOVEFILTERS () )
    RETURN
        DIVIDE ( _qty, _allqty )
    

     

    Cumulate percentage measure: =
    VAR _qty =
        SUM ( Data[Quantity] )
    VAR _cumulate =
        SUMX (
            FILTER ( ALL ( Data[Quantity] ), Data[Quantity] >= _qty ),
            [Percentage measure:]
        )
    RETURN
        _cumulate
    

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you so much for the Quick Response
      Cumulative sum is not working for me 
      if you can see Percentage % and Cummative Percentage values both are same. 
      I have used the Measures which you shared. but values are same 
      Please help ?

       

      • Jihwan_Kim's avatar
        Jihwan_Kim
        Icon for Super User rankSuper User

        Hi,

        Could you please share your sample pbix file's link here? And then I can try to look into it to come up with a more accurate solution.

        Thanks.