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

View all the Fabric Data Days sessions on demand. View schedule

Reply
arthau1
New Member

Quartiles - dynamically recalculating with slicers

Hello hello! 

 

There are a couple of topics similar to this, but none address my issue, so creating a new thread.

 

Very simple request on paper, to calculate quartiles based on value, PER year. The part I am struggling with is that it calcualtes it once, correctly, but then when I use slicers in my report, it doesn't re-calculate, but just takes those originally calculated quartile values and slots them into Q1, Q2, Q3, Q4, which creates uneven quartile distribution.

 

So far I have used PERCENTILE.INC(Main[Hourly], 0.25), with a FILTER on [Year], by using EARLIER function.

This works, up until I use any slicers in the visual later. Tried ALLSELECTED, didn't work they way I used it.
GPT & Gemini always suggest something that works except with slicers. 

 

Needs to be dynamic, so I was thinking a measure, instead of calc. column, but measures cannot be used as dimensions as far as I know.

 

Thank you!

 

 

EmployeeIDFunctionYearHourly
E1Commercial20221000.00
E2Commercial202290.00
E3Commercial202280.00
E4Finance202270.00
E5Finance202260.00
E6HR202250.00
E7HR202240.00
E8Purchasing202210.00
E9Purchasing20225.00
E1Commercial20231000.00
E2Commercial2023800.00
E3Commercial2023700.00
E4Finance2023400.00
E5Finance2023300.00
E6HR2023200.00
E7HR2023100.00
E8Purchasing2023100.00
E9Purchasing202370.00

 

1 ACCEPTED SOLUTION
Kedar_Pande
Super User
Super User

You can create separate measures for each quartile

Q1 Measure = 
PERCENTILE.INC(
FILTER(
Main,
Main[Year] = MAX(Main[Year])
),
0.25
)

Q2 Measure =
PERCENTILE.INC(
FILTER(
Main,
Main[Year] = MAX(Main[Year])
),
0.50
)

Q3 Measure =
PERCENTILE.INC(
FILTER(
Main,
Main[Year] = MAX(Main[Year])
),
0.75
)

View solution in original post

2 REPLIES 2
sjoerdvn
Super User
Super User

Indeed, calculated columns will not work and you need to use measures. If you need columns or axis to display results on you will also need to create a "helper" dimension, basically a small table with hardcoded vales (Q1, Q2, etc).
In these measure you will need to get the value from the helper dimension in the current context, and filter your result accordingly.

Kedar_Pande
Super User
Super User

You can create separate measures for each quartile

Q1 Measure = 
PERCENTILE.INC(
FILTER(
Main,
Main[Year] = MAX(Main[Year])
),
0.25
)

Q2 Measure =
PERCENTILE.INC(
FILTER(
Main,
Main[Year] = MAX(Main[Year])
),
0.50
)

Q3 Measure =
PERCENTILE.INC(
FILTER(
Main,
Main[Year] = MAX(Main[Year])
),
0.75
)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors