Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dynamic Percentiles

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.

IDDepartmentGrade
1A7
2A8
3A6
4A5
5A8
6A9
7A6
8B4
9B3
10B5
11B6
12C7
13C8
14C6
15C5
16D6
17D7
18D6
19D5
20D10

 

Many thanks!

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

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] )
)

vhenrykmstf_0-1657534760755.png

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.

View solution in original post

1 REPLY 1
v-henryk-mstf
Community Support
Community Support

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] )
)

vhenrykmstf_0-1657534760755.png

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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.