Forum Discussion
Pareto not working
- Anonymous2 years ago
Hi, o59393
I am sorry to reply to you so late.Create a new Index named Secondary Index in PowerQuery as a unique identifier and as a secondary sort.
Close and Apply. Then create a new measure and try the following DAX expression:
Index Test = ROWNUMBER ( ALLSELECTED ( Template[Facet], Template[Tier 1: Process Facet], Template[Tier 2: Activity Facet] ), ORDERBY ( [Non Duplicate Hours Process/Activity 3],DESC, MAX('Template'[Secondary Index]),ASC ) )Here is my Preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, o59393
Perhaps you might consider adding a minor sort sequence to the RANK and RANKX functions to handle duplicate values in the "% of dedicated time" column. This secondary sort should be a unique identifier for each row.
You can refer to the following DAX:
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, [UniqueIdentifier], ASC )
)
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], [UniqueIdentifier], DESC, Skip),
BLANK())
Replace [UniqueIdentifier] with the actual unique identifier in your data. This should help to distinguish between them.
If you can, please provide more details with your desired output and pbix file without privacy information (or some sample data)
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
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 would be to have the Running % column making the cumulative sum in each row.:
Thanks.
- Anonymous2 years agoNot applicable
Hi, o59393
I am sorry to reply to you so late.Create a new Index named Secondary Index in PowerQuery as a unique identifier and as a secondary sort.
Close and Apply. Then create a new measure and try the following DAX expression:
Index Test = ROWNUMBER ( ALLSELECTED ( Template[Facet], Template[Tier 1: Process Facet], Template[Tier 2: Activity Facet] ), ORDERBY ( [Non Duplicate Hours Process/Activity 3],DESC, MAX('Template'[Secondary Index]),ASC ) )Here is my Preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.