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.
Hi all,
I have a measure which is to calculate the productivity of operators, let say, productivity = sum(production)/sum(hour)
I would need a graph to show only operators with top 20% highest productivity.
i have create another measure
Top20% operators= calculate(productivity, filter(ProductionTable, productivity>percentilex.inc(ProductionTable, productivity, 0.8)))
but it doesnt work.
Please help!
Solved! Go to Solution.
Hi @Charmaine,
You could modify the measure as below:
Top20% = VAR highest = CALCULATE ( MAXX ( SUMMARIZE ( 'Production Table2', 'Production Table2'[Operator], "Top20%", [Productivity1] ), [Top20%] ), ALLSELECTED ( 'Production Table2' ) ) RETURN IF ( [Productivity1] > 0.8 * highest, [Productivity1] )
The test picture is below:
Hope it can help you!
Best regards,
Cherry
Hi @Charmaine,
From your description, if I understand your requirement correctly, you want to get the operator with Top20% productivity.
By my test, your Dax expression may not get the result you expect. You could modify your dax expression as this below:
Top20% Productivity = VAR highest = CALCULATE ( MAXX ( SUMMARIZE ( 'Production Table', 'Production Table'[operator], "Top20%", [Productivity1] ), [Top20%] ), ALL ( 'Production Table' ) ) RETURN IF ( [Productivity1] > 0.8 * highest, [Productivity1] )
For further details, you could refer to my pbix file.
Hope it can help you!
Best Regards,
Cherry
hi Cherry, do you have any alternative if we do it another way round to show the top 20% operators only.
Hi @Charmaine,
You could modify the measure as below:
Top20% = VAR highest = CALCULATE ( MAXX ( SUMMARIZE ( 'Production Table2', 'Production Table2'[Operator], "Top20%", [Productivity1] ), [Top20%] ), ALLSELECTED ( 'Production Table2' ) ) RETURN IF ( [Productivity1] > 0.8 * highest, [Productivity1] )
The test picture is below:
Hope it can help you!
Best regards,
Cherry
what if instead of productivity I have a calculated measure, which goes row by row in my fact table?
I can´t seem to get it wright
regards
Hi Cherry @v-piga-msft, Thanks for your time. I have modified the set of data by adding a date column, and in my pbi i would have a date filter.
but in some cases, there is no operator return. In my understanding, there should have at least one operator is in top 20% productivity in any situation?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |