Forum Discussion
Pareto not working
- Anonymous2 years ago
Hi o59393 ,
You should create index column in power query. Then try formula like below:
pareto = VAR cur_ = 'Table'[Name] VAR cur_index = 'Table'[Index] RETURN SUMX ( FILTER ( ALL ( 'Table' ), 'Table'[Name] = cur_ && 'Table'[Index] <= cur_index ), [TotalPercentage] )Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 2 years ago
Hi,
I have solved a similar problem in the attached PBI file.
Hope this helps.
Hi,
I have solved a similar problem in the attached PBI file.
Hope this helps.
- o593932 years ago
Post Prodigy
- Ashish_Mathur2 years ago
Super User
You are welcome.
- o593932 years ago
Post Prodigy
Just one question, when I have %'s with identical values, the Pareto and the Index function I created are not calculating correctly:
For instance, all the 5.15% values have the same index value of 2 and the pareto column doesnt sum correctly.
The formulas are:
Index = RANK ( DENSE, ALLSELECTED ( Template[Facet], Template[Function], Template[Tier 1: Process Facet], Template[Tier 2: Activity Facet] ), ORDERBY ( [Non Duplicate Hours Process/Activity 3], DESC ) )RANK = if(HASONEFILTER( 'Template'[Facet]), calculate( RANKX( GENERATE( GENERATE( ALLSELECTED('Template'[Tier 1: Process Facet]), ALLSELECTED('Template'[Tier 2: Activity Facet])), ALLSELECTED('Template'[Facet])), [Non Duplicate Hours Process/Activity Numerator],,DESC)), BLANK())Running % = DIVIDE([Running total], CALCULATE([Non Duplicate Hours Process/Activity Numerator], ALLEXCEPT(Template,Template[Function],Template[Area])))Running total = SUMX(TOPN( [Rank], CALCULATETABLE( GENERATE(GENERATE(values( 'Template'[Facet]), values( 'Template'[Tier 1: Process Facet])), values('Template'[Tier 2: Activity Facet])), GENERATE( GENERATE(ALLSELECTED( 'Template'[Facet]), ALLSELECTED('Template'[Tier 1: Process Facet])), ALLSELECTED('Template'[Tier 2: Activity Facet]))), [Non Duplicate Hours Process/Activity Numerator]), [Non Duplicate Hours Process/Activity Numerator])Any idea how to fix this?
Thanks.
- Ashish_Mathur2 years ago
Super User
Hi,
Share some dummy data to work with and show the expected result.
- o593932 years ago
Post Prodigy
Please see attached a pbix sample: https://drive.google.com/file/d/1rID6tbIhYqanx6gcQnDaLESnn3eZr3vQ/view?usp=sharing
You will see repeated index (8 and 10 for example) where they have the same % value 3.51% and 2.51% respectively.
The desired outcome (in green columns) would be to have the Running % column making the cumulative sum in each row.:
Thanks.