Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello community,
I have the below dataset that has grades from students in each department. I want to calculate percentiles (p25, p50, p.75) for all students but also when I filter with slicer the Department I want to see the percentiles for that category only.
| ID | Department | Grade |
| 1 | A | 7 |
| 2 | A | 8 |
| 3 | A | 6 |
| 4 | A | 5 |
| 5 | A | 8 |
| 6 | A | 9 |
| 7 | A | 6 |
| 8 | B | 4 |
| 9 | B | 3 |
| 10 | B | 5 |
| 11 | B | 6 |
| 12 | C | 7 |
| 13 | C | 8 |
| 14 | C | 6 |
| 15 | C | 5 |
| 16 | D | 6 |
| 17 | D | 7 |
| 18 | D | 6 |
| 19 | D | 5 |
| 20 | D | 10 |
Many thanks!
Solved! Go to Solution.
Hi @Anonymous ,
You can try below formula:
M_0.25 =
CALCULATE (
PERCENTILE.EXC ( 'Table'[Grade], 0.25 ),
ALLEXCEPT ( 'Table', 'Table'[Department] )
)M_0.5 =
CALCULATE (
PERCENTILE.EXC ( 'Table'[Grade], 0.5 ),
ALLEXCEPT ( 'Table', 'Table'[Department] )
)M_0.75 =
CALCULATE (
PERCENTILE.EXC ( 'Table'[Grade], 0.75 ),
ALLEXCEPT ( 'Table', 'Table'[Department] )
)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can try below formula:
M_0.25 =
CALCULATE (
PERCENTILE.EXC ( 'Table'[Grade], 0.25 ),
ALLEXCEPT ( 'Table', 'Table'[Department] )
)M_0.5 =
CALCULATE (
PERCENTILE.EXC ( 'Table'[Grade], 0.5 ),
ALLEXCEPT ( 'Table', 'Table'[Department] )
)M_0.75 =
CALCULATE (
PERCENTILE.EXC ( 'Table'[Grade], 0.75 ),
ALLEXCEPT ( 'Table', 'Table'[Department] )
)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 78 | |
| 66 | |
| 65 |