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.
Hello there,
I'm looking for two things with my powerBI, firstly to count a total of each measure per department and show as a percentage out of 100 e.g.:
For department1, looking at the measure "IT", the score is represented by 1's and 0's. I'd like a measure to count the number of measures we're looking at e.g. for IT in department1, we're looking at an over all potential score of 3.
SO for department 1, the score is 2/3, so should be represented as 66%.
for department2 IT, the score it 1/2 so should be represented at 50%
Department 3 is 1/1 so 100% etc...
the score should be split per measure, meaning department1 score for IT is 66%, for finance it is 100%
department2 IT is 50%, finance is 0% and so on...
Any help would be greatly appreciated!!
Department | Measure | Score |
Department1 | IT | 0 |
Department1 | IT | 1 |
Department1 | IT | 1 |
Department2 | IT | 0 |
Department2 | IT | 1 |
Department3 | IT | 1 |
Department1 | Finance | 1 |
Department1 | Finance | 1 |
Department2 | Finance | 0 |
Department2 | Finance | 0 |
Department3 | Finance | 1 |
Department3 | Finance | 0 |
The reason i'm asking for this is so that i can show my scores for each department in a bar graph:
The graph can be filtered to each "measure" and the score is adjusted. currently the score just counts the number of 1's rather than showing as an over all percentage.
Solved! Go to Solution.
Hi, @jonbox
Try to create measures like this:
_count =
CALCULATE(COUNT('Table'[Measure]),FILTER(ALLSELECTED('Table'),'Table'[Department]=MAX('Table'[Department])))
_percentage =
var _score=CALCULATE(SUM('Table'[Score]),FILTER(ALLSELECTED('Table'),'Table'[Department]=MAX('Table'[Department])))
return DIVIDE(_score,[_count])
Result:
Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @jonbox
Try to create measures like this:
_count =
CALCULATE(COUNT('Table'[Measure]),FILTER(ALLSELECTED('Table'),'Table'[Department]=MAX('Table'[Department])))
_percentage =
var _score=CALCULATE(SUM('Table'[Score]),FILTER(ALLSELECTED('Table'),'Table'[Department]=MAX('Table'[Department])))
return DIVIDE(_score,[_count])
Result:
Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |