The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello,
My dataset is the following :
Each people has 1 row for 1 month with a score ( Month | Name | score ).
I have the report below : It matches a name and his average score
The following measure allow me to sort people in the right section, even if I select several months :
Here is my problem :
I'd like to get the number of people in each category.
Ideally I'd like to get it through a piechart , but the thing is I can't use a measure as a Legend / Category.
I created a column using the same Dax expression without Average
There are a number of considerations here.
1. Does it have to be a measure?
2. Will you ever only want to categorize by month or will there be other filter scenarios too?
Basically in your measure you need to compute the score for each technician for each filter category (eg each month) and then add additional logic to see if they consistently fall into the same category or not. Let's say a technician has a score of 92 in January but of 80 in February. Which bucket should the go into?
By the way you can simplify your original measure
Measure = SWITCH(TRUE()
,[score]==BLANK(),"ABS"
,AVERAGE([score])<80,"<80"
,AVERAGE([score])<90,"89-80"
,AVERAGE([score])<93,"92-89"
,">92"
)
Hello lbendlin ,
I thought I answered but I don't see my message ...
I guess it should be a measure since I need to dynamically match people and category ( even If severals month are selected ).
Thank for the tip ! I 'm not very familiar with SWITCH statement, but it seems very usefull each time I meet it 😀
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |