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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
StilHopen
Frequent Visitor

Percentile using counts

I have found that to get percentile for counts based off day/hour I have needed to group by days or hours and do the counts in advance of doing the percentile calc or it would not work.  Is there a better way to do this so that slicers will work or do I just have to create tables for each percentile slicer?

 

IE:

a table with multiple events on a day and I need to see the counts per day and per hour.(date and hour are already split out to their own columns).

 

Hopefully this makes sense, but it just seemed weird that average/mode/median work great, but percentile doesn't behave the same way.

1 ACCEPTED SOLUTION
StilHopen
Frequent Visitor

NeverMind, found my own solution as it was just a typo that I couldn't help but recreate everytime.  I blame temporary insanity.
 
What the end result looked like:
Calc 90th =
PERCENTILEX.INC(
    KEEPFILTERS(VALUES('Table'[DateTime])),
    CALCULATE(COUNTA('Table'[ID#])), 0.9
)

View solution in original post

3 REPLIES 3
StilHopen
Frequent Visitor

NeverMind, found my own solution as it was just a typo that I couldn't help but recreate everytime.  I blame temporary insanity.
 
What the end result looked like:
Calc 90th =
PERCENTILEX.INC(
    KEEPFILTERS(VALUES('Table'[DateTime])),
    CALCULATE(COUNTA('Table'[ID#])), 0.9
)
Anonymous
Not applicable

Hi @StilHopen,

Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

lbendlin
Super User
Super User

Everything is always based on filter context, especially when it comes to implicit measures. Don't like that?  Write explicit measures. That will allow you to define the scope for your percentiles (with the option to override the filter context)

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.