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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
)
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.