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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
marco_2020
Helper I
Helper I

Pareto chart with duplicate values

Hello,

 

I am working on a dataset as the one reported in the following: I have a category field (with 3 possible values: A,B,C). As you can see In total I have 6 record with A and C and 4 with B. I would like to create a Pareto chart with this kind of data, where it is possible to have duplicate values, but I am having the chart reported in the following where I have the same percentage values for bins with the same count. I also report the formulas.

marco_2020_1-1596787787879.png   marco_2020_3-1596787940232.png

 

Total = CALCULATE(COUNT(Sheet1[Index]),ALL(Sheet1))

CumulativeCount =

var totalTest = COUNT(Sheet1[Index])

RETURN
SUMX(FILTER(
SUMMARIZE(ALLSELECTED(Sheet1),Sheet1[Category],"NumberOfRecords",[NumOfRecords]),
[NumberOfRecords] >= totalTest),[NumberOfRecords])


CumulativePerc = [CumulativeCount]/[Total]

Thank you.

Marco

11 REPLIES 11
v-yingjl
Community Support
Community Support

Hi @marco_2020 ,

If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly. Thanks!


Best Regards,
Yingjie Li

Hi, I have not solved my issue yet. Sorry. Thanks again.

v-yingjl
Community Support
Community Support

Hi @marco_2020 ,

In your posted formula, not sure what does [NumOfRecords] represent so that could not reproduce it well in my environment. Could you please considering sharing the information about it or a sample .pbix file and expected result for further discussion?

 

Sample file and expected output would help tremendously.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,
Yingjie Li

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

Hi @v-yingjl,

 

I attach in the following all my measures:

 

 

 

 

NumOfRecords = COUNT(Sheet1[Index])
--------
total = CALCULATE(COUNT(Sheet1[Index]),ALL(Sheet1))
---------
CumulativeCount = 
var totalTest = COUNT(Sheet1[Index])
RETURN
SUMX(FILTER(
SUMMARIZE(ALLSELECTED(Sheet1),Sheet1[Category],"NumberOfRecords",[NumOfRecords]),
[NumberOfRecords] >= totalTest),[NumberOfRecords])
---------
Cumm % = divide([CumulativeCount],[total])

 

 

 

 

Sheet1 is the following table: 

 
IndexCategory
1A
2B
3B
4C
5C
6C
7C
8A
9A
10B
11A
12A
13A
14B
15C
16C

Following there is the chart which I am obtaining with current formulas and in red the one which I would like to obtain. In particular the problema regards "A" and "C" categories for which I currently have the same percentage value (as if these 2 categories are considered the same thing).

image.png

 

 

 

 

 

 

 

 

 

 

Have you ideas about how to help me?

Thanks in advance.

 

Hi @marco_2020 ,

If you want to achieve the same goal as the Pareto chart in the combo chart, you need to create a sort column manually in your data source to force the definition order because combo chart cannot automatically define the order of an A,C,B based on the current data.

Table will be like this:

sort .png

Create this measure:

Measure = 
CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALL('Table'),
        'Table'[sort column] <= MAX('Table'[sort column])
    )
)

Cumm % = DIVIDE([Measure],[total])

pareto.png

 

Attached sample file that hopes to help you: Pareto chart.pbix

 

Best Regards,
Yingjie Li

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

Hello @v-yingjl,

 

thank you for your precious answer, but I still miss one thing: I need to dynamically create the "sort column" field since the data table can be modified and then the Pareto chart report has to update accordingly.

 

Is there a way to calculate the column which you have added to the original table?

 

Many thanks.

 

Hi @marco_2020 ,

I'm afraid not. Because the logic of sory by A,C,B is difficult to define. Although the count of A and C is both 6, but the unicode of them is C > B > A so cannot define the logic to create a sort column dynamically. Although it is more cumbersome to force define the sorting column manually, it is a more direct and effective method.

 

Best Regards,
Yingjie Li

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

amitchandak
Super User
Super User

@marco_2020 ,

cumm = calculate(COUNT(Sheet1[Index]), filter(allselected(Sheet1),Sheet1[Index] <=max(Sheet1[Index])))
total = calculate(COUNT(Sheet1[Index]), allselected(Sheet1))

Cumm %  = divide([cumm],[total])
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

@amitchandak  thanks for the answer.

 

With your formula I obtain a chart which is not ordered in the Pareto way, as shown in the following:

 

marco_2020_0-1596789291301.png

I would like to have A and C column as first ones. Is it possible?

 

Thanks,

Marco

@marco_2020 , Using the three dots on the visual see if you can sort descending on the Measure used in bar.

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

@amitchandak  I have tried all combinations using 3 dots.. I have obtained this:

marco_2020_0-1596792651744.png

But in this way, the cumulative perc is not increasing.

Do you have any ideas to solve this problem?

 

Thanks

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors