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
vincentakatoh
Helper IV
Helper IV

Production Pareto does not work if select more than 1

Hi, 

Created a Pareto Chart using below DAX. 

 

New Table 

Pareto = SUMMARIZE(
data,
Data[Area],
Data[Line],
Data[station],
"DefectFn",sum(Data[TR])
)

 

New column

rank = RANKX(ALLSELECTED('Pareto'),'Pareto'[DefectFn],,desc)

 

New meaure

AccumTotal = CALCULATE(SUM('Pareto'[DefectFn]), filter(ALLSELECTED('Pareto'),'Pareto'[rank]<=MAX('Pareto'[rank])))

 

The Pareto works well when I select a specific line.

2017-05-17 23_44_21-Start.png2017-05-17 23_47_29-Production Yield Pareto - Power BI Desktop.png

 

 

Nontheless. the Pareto fails is I select all lines.

Help needed: Need help to change the DAX such that Pareto will not fail if I select all lines. 

2017-05-17 23_44_51-Start.png

 

 

 

 

1 ACCEPTED SOLUTION

@vincentakatoh,

You can download my PBIX file from the link below.

https://1drv.ms/u/s!AhsotbnGu1NogmH4VMeo7BOjP_Rf

Regards,
Lydia

Community Support Team _ Lydia Zhang
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

6 REPLIES 6
v-yuezhe-msft
Employee
Employee

Hi @vincentakatoh,

Do you want to create cumulative running total based on highest DefectFn? If so, create the following measures in your table.

Measure = SUM(Pareto[DefectFn])
AccumTotal1 = IF(NOT(ISBLANK([Measure])),CALCULATE([Measure],FILTER(ALL(Pareto[Station]),SUM(Pareto[DefectFn])<=[Measure])))
1.PNG2.PNG

If the above DAX doesn't help, please share sample data of your table and post expected result here.



Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Lydia, 

 

Thanks. Very close. But how to show the AccumTotal1 as a percentage of grand total? Need to show the line in a percentage. 

 

Uploaded sample data

 

2017-05-18 21_50_07-Production Yield Pareto - Power BI Desktop.png

Hi @vincentakatoh,

You can create percentage using the following DAX.

Measure 2 = IF(NOT(ISBLANK([Measure])),CALCULATE([Measure],ALL(Pareto[Station])))
%GT ActualToal1 = [AccumTotal1]/[Measure 2]

1.PNG2.PNG


Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Lydia, 

Thanks again. Can you attached your sample file for my reference? I'm getting an error msg on Measure 2. 

 

Thanks for helping a DAX dummy like me.

2017-05-19 17_12_56-Production Sample Data 0519 - Power BI Desktop.png

@vincentakatoh,

You can download my PBIX file from the link below.

https://1drv.ms/u/s!AhsotbnGu1NogmH4VMeo7BOjP_Rf

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Lydia, 

Thanks again. Can you attached your sample file for my reference? I'm getting an error msg on Measure 2. 

 

Thanks for help a DAX dummy like me 😄


2017-05-19 17_12_56-Production Sample Data 0519 - Power BI Desktop.png

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.