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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
krishb1414
Helper III
Helper III

Cumulative percentage showing same for same product

Hi Everyone,

 

I created one measure for cumulative percentage, but when value of any product is same then cumulative percentage is also getting same. Why ?

If i do that in excel will give add same value and returning different percentage. Anyone knows why this gap ?

see the images for reference 

krishb1414_0-1686635437726.pngkrishb1414_1-1686635486421.png

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @krishb1414 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1686797108975.png

(2) We can create a measure. 

cumulative percentage = 
var _total=CALCULATE(SUM('Table'[total price]),FILTER(ALL('Table'),'Table'[total price]))
var _price=CALCULATE(SUM('Table'[price]),FILTER(ALL('Table'),'Table'[Product]<=MAX('Table'[Product])))
return DIVIDE(_price,_total,0)

(3) Then the result is as follows.

vtangjiemsft_1-1686797141532.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

View solution in original post

1 REPLY 1
v-tangjie-msft
Community Support
Community Support

Hi @krishb1414 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1686797108975.png

(2) We can create a measure. 

cumulative percentage = 
var _total=CALCULATE(SUM('Table'[total price]),FILTER(ALL('Table'),'Table'[total price]))
var _price=CALCULATE(SUM('Table'[price]),FILTER(ALL('Table'),'Table'[Product]<=MAX('Table'[Product])))
return DIVIDE(_price,_total,0)

(3) Then the result is as follows.

vtangjiemsft_1-1686797141532.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.