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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
JajatiDev
Helper II
Helper II

Pareto Chart with DAX Function

Hi,

This is a follow-up to my previous query.

I am trying to create a DAX function to convert the below table into a Pareto Chart.

 

x-axis: SC_TAT days

y-axis: CountOfOrderLines

 

Please assist with the DAX function that would capture the cumulative, total and percentage in one measure which can then be converted into a chart.

 

Regards,

Jajati Dev

 

SC_TAT (Days)CountOfOrderLinesCumulativeTotalPercentage
06643   
1597   
2201   
3226   
4291   
5397   
6300   
7306   
8340   
9268   
10236   
11179   
12206   
13171   
14199   
15213   
16141   
17118   
18170   
19143   
20118   
21136   
22114   
23109   
24130   
2588   
2696   
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JajatiDev ,

 

Please check the formulas.

Cumulative = SUMX(FILTER(ALLSELECTED('Table'),'Table'[SC_TAT (Days)]<=MAX('Table'[SC_TAT (Days)])),'Table'[CountOfOrderLines])
Total = SUMX(ALLSELECTED('Table'),'Table'[CountOfOrderLines])
Percentage = format(SUMX('Table','Table'[CountOfOrderLines])/[Total],"percent")

vjaywmsft_0-1653030580112.png

Pbix as attached.

 

Best Regards,

Jay

View solution in original post

8 REPLIES 8
LucasPete
Regular Visitor

Hi,

 

How to build a pareto chart for one column?
I have a column - "Failures", in which errors occur repeatedly. On the column chart, unique names of the failure should appear on the X axis, and on the Y axis, the number of times it repeated should appear. The pareto chart will be a line of the % occurrence of a given failure from the entire table.

 

Thanks for the help in advance

Anonymous
Not applicable

Hi @JajatiDev ,

 

Please check the formulas.

Cumulative = SUMX(FILTER(ALLSELECTED('Table'),'Table'[SC_TAT (Days)]<=MAX('Table'[SC_TAT (Days)])),'Table'[CountOfOrderLines])
Total = SUMX(ALLSELECTED('Table'),'Table'[CountOfOrderLines])
Percentage = format(SUMX('Table','Table'[CountOfOrderLines])/[Total],"percent")

vjaywmsft_0-1653030580112.png

Pbix as attached.

 

Best Regards,

Jay

Whitewater100
Solution Sage
Solution Sage

Hi:

You my be looking for this version. It's on the file upload. It's more in order of day number.

Cumulated Orders V2 =
 
VAR currorders = 'Table'[SC_TAT (Days)]
return
SUMX(
FILTER('Table',
'Table'[SC_TAT (Days)] >= currorders),
'Table'[CountOfOrderLines])
 
Whitewater100_1-1652813993620.png

 

Hello:

 

Did my reply answer your initial question? Thanks..

Whitewater100
Solution Sage
Solution Sage

Hi:

I updated the calcs. Please see attached file. I hope this solves your question! Thanks.https://drive.google.com/file/d/1AmZdKZ0R0YYwGR4bpT36QFM8U_yePF7k/view?usp=sharing 

Whitewater100_0-1652813121884.png

I hope this helps!

Whitewater100
Solution Sage
Solution Sage

Hello:

You can try a couple calculated columns, after one initial measure

Measure ... Order Lines = SUM(Table[CountofOrderLines])

Cumulated Orders =
CALCULATE(
    [Order Lines] ,
    ALL( Table ),
    Table[Order Lines] >= EARLIER( Table[Order Lines ))
 
Cumulated Percentage = DIVIDE( Table[Cumulated Orders] , SUM( Table[CountofOrderLines] ) , 0 )
 
I hope this helps!
Anonymous
Not applicable

Hi jajatidev,

 

Please find attached required help,

I took your datas and saved table as Pareto.

 

After 2 measures :

cumulative =
VAR compteur =
    SELECTEDVALUE ( Pareto[SC_TAT (Days)] )
VAR result =
    CALCULATE (
        SUM ( Pareto[CountOfOrderLines] ),
        ALL ( Pareto ),
        Pareto[SC_TAT (Days)] <= compteur
    )
RETURN
    result

 

and the percentage :

cumulative percent =
VAR compteur =
    SELECTEDVALUE ( Pareto[SC_TAT (Days)] )
VAR totalorederline =
    CALCULATE ( SUM ( Pareto[CountOfOrderLines] )ALL ( pareto ) )
VAR cumulative =
    CALCULATE (
        SUM ( Pareto[CountOfOrderLines] ),
        ALL ( Pareto ),
        Pareto[SC_TAT (Days)] <= compteur
    )
VAR result =
    DIVIDE ( cumulativetotalorederline )
RETURN
    result

 

Hi James,

Thanks for the quick response.

Could you please share the .pbix file for me to review because while trying to replicate I am not getting the desired result?

 

Regards,

Jajati Dev

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.