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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HansBa
New Member

Pareto chart: error in cumulative percentage

Hi,

 

I'm trying to create a Pareto chart, but I'm facing an issue with the calculation of the cumulative percentage.

 

My data looks like:

PowerBI_1.JPG

 

I want to built a pareto chart with the total stop time per reasonas a bar chart, and the cumulative percentage per reason as a line chart.

 

I first built a rank column: Rank = RANKX(ALL(FactsStopReasons[Reason]);[TotalStopTime])

 

This gives me:

PowerBI_2.JPG

 

As you can see, the rank has an equal value when the total stop time is equal.

 

This results in:

 

PowerBI_3.JPG

 

The bar chart is correct, but the cumulative view is not correct. The cumulative view doesn't work when the rank is equal.

 

My cumulative sum has following formula:

CumulativeStopTime = SUMX(TOPN([Rank];ALL(FactsStopReasons[Reason]);[TotalStopTime];DESC);[TotalStopTime]) 

Amount_All = CALCULATE([TotalStopTime]; ALL(FactsStopReasons[Reason]))

Pareto % = DIVIDE([CumulativeStopTime]; [Amount_All]; BLANK())

 

This is all working fine, also when I apply filters etc. But when values are equal, and as a consequence also the rank, my cumulative % is not correct.

 

I already tried to calculate a rank in power query, but this will limit me in the filters afterwards. It needs to be calculated on the fly in my opinion.

 

Who has any idea?

 

Many thanks for the feedback!

 

Regards,

Hans

 

 

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @HansBa'

I made a test but can't reproduce the rank as yours, could you point out what's wrong with me?

8.png

 

Best Regards

Maggie

Hi Maggie,

 

thanks for your reply!

 

In my table with the rank, the value for reason 90 are grouped. So the total StopTime for reason 90 = 11. The rank is based on the aggregated value.

 

Regards,

Hans

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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