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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Pareto chart jagged because of duplicate values

Hello,

 

I appreciate any help in advance on this. I am trying to create a Pareto chart that can dynamically filter. I have created a Pareto chart using the formula below but it creates some jagged parts in the line because some categories have the same exact counts. I am using a summarized table based on the underlying dataset that way you can dynamically filter (if there is a better option I am all ears). 

How do I handle the exact values for the pareto? In excel you would calculate a running total after you have sorted the values from high to low then you can create the cumulative percentage. The only thing I could think of is maybe making an index column using dax but I have hit a road block there since there is no reference column and you would have to force the sort some how in the summarized table.

 

 

 

 

 

var  totalComplaints = CALCULATE(COUNT(CUSTOMER_FEEDBACK[FEEDBACK#]),ALLSELECTED(CUSTOMER_FEEDBACK))

var currentComplaints = COUNT(CUSTOMER_FEEDBACK[FEEDBACK#])

var summarizedTable = 
SUMMARIZE(
    ALLSELECTED(CUSTOMER_FEEDBACK),
    CUSTOMER_FEEDBACK[DEFECTCODE],
    "Complaint Count", COUNT(CUSTOMER_FEEDBACK[FEEDBACK#])
)

var cumulativeSum = 
SUMX(
    FILTER(summarizedTable, [Complaint Count] >= currentComplaints),
    [Complaint Count]
)

return

cumulativeSum/totalComplaints

 

 

This is the result of the summarized table. Each Category is a single row in the underlying table.

CategoryCount
Identification Numbers126
Does Not Meet Requirement105
Other79
Length70
Thread Form68
ID58
Burr/Chip56
Scratches/Dents43
Missing Information39
Hex/Square36
Missing30
OD/Major Diameter30
Minor Diameter29
Profile27
Quantity27

 

Capture.PNG

6 REPLIES 6
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Any chance you can share a PBIX file with dummy data?(cloud service like onedrive for business)

Please mask any sensitive data before uploading.

 

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

Hi Liang,

I 'm having the exact same issue, when no external filters are applied everything works

aaaaaaaaaaaaaa_0-1630603841173.png

 

then when I filter dates or any other column, some random duplicates appear

aaaaaaaaaaaaaa_1-1630603942679.png

 

 

Here is the DAX measure used:

Pareto Sales % = 
    VAR total_rev = 
        CALCULATE(
            SUM( sales[revenue_after_commission] ),
            ALLSELECTED( sales )
        )

    VAR grouped_table = 
        FILTER(
            SUMMARIZE(
                ALLSELECTED( sales ),
                products[uid],
                "grouped_revenue", 
                SUM( sales[revenue_after_commission] )
	        ),
            [grouped_revenue] > 0
        )

    VAR cummu_rev =
        SUMX(
            FILTER( grouped_table, SUM( sales[revenue_after_commission] ) <= [grouped_revenue] ) , 
            [grouped_revenue]
        )
    
    RETURN
        DIVIDE( cummu_rev, total_rev )

 

It's like ALLSELECTED is glitching out, is this a bug?

 

Please advise, thank you!

Update:

 

Publishing the report online creates random duplicates even though no filters are selected.

 

After playing around in DAX studio, I found out grouped_table and SUMMURAZE results are actually consistant.
However, SUMXing an expression table gives different result, displacing duplicates randomly every computation, which is kinf of scary tbh

 

The issue is reproductible on any fact table.

 

Is this a normal behaviour?

 

Any help would be much appreciated, thank you!

Hi @aaaaaaaaaaaaaa , @Anonymous 

 

Can you guys share a sample of your file?

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi Amine, 

 

Thank you for your reply

 

The source of the issue was that SUMX is not able to iterate over duplicate values for 2 different categories, each category must have unique sales figures for the cumulative sum to work...

 

I found a weird way to make SUMX cumulative calculation work on duplicate values by substracting the category ID divieded by 1000 to the values so all values (sales) become unique:

 

Pareto Sales % = 
    VAR total_rev = 
        CALCULATE(
            SUM( sales[revenue_after_commission] ),
            ALLSELECTED( sales )
        )

    VAR grouped_table = 
        FILTER(
            SUMMARIZE(
                ALLSELECTED( sales ),
                products[uid],
                "grouped_revenue", 
                SUM( sales[revenue_after_commission] )
	        ),
            [grouped_revenue] > 0
        )

    VAR cummu_rev =
        SUMX(
            FILTER( grouped_table, SUM( sales[revenue_after_commission] ) - MAX( products[uid] ) / 1000 <= [grouped_revenue] ), 
            [grouped_revenue]
        )
    
    RETURN
        DIVIDE( cummu_rev, total_rev )

 

where products and sales tables are linked as follows:

aaaaaaaaaaaaaa_0-1631045529076.png

 

It is not pretty but it works!

 

I tried to upload a sample pbix to illustrate the problem but it seems this file type is not supported

 

Thanks again

Hi @aaaaaaaaaaaaaa 

Please use an online service to upload your file, like Onedrive, Google dirve,.... and share the link

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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