Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I want to count how many people are within a range based on the slicer selection and put this in a pie chart
The range is 0
>0 and <= 3,5
>3,5
I've calculated the average for each person and it changes when selecting 1 or multiple months but how can I count this.
I attached a small sample. Let me know if my questions is not clear enough.
Solved! Go to Solution.
Hi @meskens ,
First create a new table:
Then apply this:
Count Values =
var _a = SUMMARIZE('sheet',sheet[Naam/voornaam],"Percentage",[ziekteverzuimpercentage])
return
SWITCH(SELECTEDVALUE('Table'[Value]),
"0",COUNTX(FILTER(_a,[Percentage]=0),[Naam/voornaam]),
"0-3.5",COUNTX(FILTER(_a,[Percentage]>0&&[Percentage]<=0.035),[Naam/voornaam]),
"over 3.5",COUNTX(FILTER(_a,[Percentage]>0.035),[Naam/voornaam]))
Output:
Best Regards,
Gengar
Thanks Gengar, this works perfectly!
Hi @meskens ,
First create a new table:
Then apply this:
Count Values =
var _a = SUMMARIZE('sheet',sheet[Naam/voornaam],"Percentage",[ziekteverzuimpercentage])
return
SWITCH(SELECTEDVALUE('Table'[Value]),
"0",COUNTX(FILTER(_a,[Percentage]=0),[Naam/voornaam]),
"0-3.5",COUNTX(FILTER(_a,[Percentage]>0&&[Percentage]<=0.035),[Naam/voornaam]),
"over 3.5",COUNTX(FILTER(_a,[Percentage]>0.035),[Naam/voornaam]))
Output:
Best Regards,
Gengar
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |