Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Calculate Cumulative % Of Totals without date

Im trying to get a calculation of the cumulative % of totals.

Example i have the values by names (and no date order cause i filter with a slicer by year and month) in this case im more interested in obtaining the total per name, and sorted them by value from higher to lower. but i cant manage to get the cumultive %

 

NameValue%Cumulative
A173935.8%35.8%
B109422.6%58.4%
C78416.2%74.6%
D77516.0%90.5%
E2455.1%95.6%
F1944.0%99.6%
G200.4%100.0%
Total4851100.0% 
3 REPLIES 3
Anonymous
Not applicable

Hello! I tried this and im getting close to it, however although im sorting the table by Value, the calculation for the cumulative value ranks the accumulative sum by the store name rather than the highes value, so im getting very random % along the accumulative column: this is the code i used 

CumulativeTotal = 
VAR CurrentStore = SELECTEDVALUE([Store])
VAR TotalSales = CALCULATE(SUM([Value]), ALLSELECTED([Store]))
VAR CumulativeSales = SUMX( 
    FILTER( 
        ALL([Store]), 
        [Store] <= CurrentStore 
    ), 
    CALCULATE(SUM([Value])) 
 
 
 
RETURN DIVIDE(CumulativeSales, TotalSales
Anonymous
Not applicable

Hi, @Anonymous 

 

Maybe you can also try the following DAX:

 

Cumulative total = 
CALCULATE(
    SUM('Table1'[Value]),
    FILTER(
        ALLSELECTED('Table1'),
        'Table1'[Name] <= MAX('Table1'[Name])
    )
) / CALCULATE(SUM('Table1'[Value]), ALL('Table1'))

 

Here is my preview:

 

vyohuamsft_0-1709711469732.png

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

Best Regards

Yongkang Hua

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

 

JamesFR06
Resolver IV
Resolver IV

Hi Carferrom

 

I have create a table "Cumulative" with your datas.

JamesFR06_0-1709657049162.png

Please find the code of the measure :

CumulativeTotal =

var ventes =sum(Cumulative[Value])
var TotalSales=calculate(sum(Cumulative[Value]),all(Cumulative))
var ProgCumul=
sumx(
filter(summarize(allselected(Cumulative),Cumulative[Name],
"Ventes Periode",sum(Cumulative[Value])),
[Ventes Periode]>=ventes),
[Ventes Periode])

return
divide(ProgCumul,TotalSales)

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.