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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Cumulative precentage not displayed correctly

I have a measure calculating cumulative percentage over a 'category' called delivery hour.

When I display the data in a table the percentages are correct but displaying it in any of the strandard charts results in this weird up and down fluctuation. Thanks for any ideas on what might be wrong here.

trepik_1-1612251335963.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks @amitchandak  for highlighting some key parts of the formula.

I managed to solve the issue and for anyone experiencing similar troubles, here is my solution.

 

I found out that everything worked fine with no filters, slicers applied to the visual.

The visualisation was not as expected when additional slicers/filters were applied.

I adjusted the measure so that sliced/filtered dataset would be handeled and visualized correctly.

In the first part of the DAX inside the ALLSELECTED function one needs to specify all the dimensions which could be used as filters/slicers to change the dataset for the visual.

Shipments % by Delivery hour =
CALCULATE(
    'Detail'[Shipments],
    FILTER(
        ALLSELECTED('Detail'[Delivery hour],Detail[Carrier],...),
        ISONORAFTER('Detail'[Delivery hour], MAX('Detail'[Delivery hour]), DESC)
    )
)/CALCULATE(
    'Detail'[Shipments],
    ALLSELECTED('Detail'[Delivery hour])
)
I hope it's clear but if not don't hasitate to ping me.

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , While allselected should allow your filter to adjust cummulative for filters/slicers. You can stop that from happing using all.

 

If you can share some sample, I can help more.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks @amitchandak  for highlighting some key parts of the formula.

I managed to solve the issue and for anyone experiencing similar troubles, here is my solution.

 

I found out that everything worked fine with no filters, slicers applied to the visual.

The visualisation was not as expected when additional slicers/filters were applied.

I adjusted the measure so that sliced/filtered dataset would be handeled and visualized correctly.

In the first part of the DAX inside the ALLSELECTED function one needs to specify all the dimensions which could be used as filters/slicers to change the dataset for the visual.

Shipments % by Delivery hour =
CALCULATE(
    'Detail'[Shipments],
    FILTER(
        ALLSELECTED('Detail'[Delivery hour],Detail[Carrier],...),
        ISONORAFTER('Detail'[Delivery hour], MAX('Detail'[Delivery hour]), DESC)
    )
)/CALCULATE(
    'Detail'[Shipments],
    ALLSELECTED('Detail'[Delivery hour])
)
I hope it's clear but if not don't hasitate to ping me.
amitchandak
Super User
Super User

@Anonymous , the measure seems fine. Just remove the table name in front of shipments and try.

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Ok isolating the case to the sparate file helped to identify potential reason of this behavior.
I did take only two dimensions (delivery hour, category), the measure (shipments) and created the cumulative percentage measure like i had it in my original file. Everything seems okay and the chart is displayed properly. Also did an extra testing in the original file and removed all the slicing by other dimensions. This proved to eradicate the issue of not properly displayed chart.
If I may, my new question would be how to update the measure so that I can slice the data with aditional dimensions and not mess up the visualization of the cumulative precentage measure. 

Thanks

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors