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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
sahildoshi
Helper I
Helper I

Power BI : Dynamic past 365 days 95th Percentile

Hi, I have a scenario where I need to calculate 95th percentile for dynamic past 365 days for each row. Please refer below snip, where user will select the date range and based on that selection, all dates will be listed one by one.  As you can see against each date, Lowest balance for them is displayed. 

 95_tile.png

 

What I want is, to compare 95th percentile for past 365 days against the Lowest balance for that day and display whether 95th percentile is Above or Below than the lowest balance of that day. 

95_output.png

 

So far, I have tried below formula but it returns the same value as of Lowest Balance.

95%tile_Measure = 
var _end_date = MAX(date)
var _start_date = _start_date - 365
RETURN CALCULATE(PERCENTILE.INC(low_balance, 0.95), FILTER(Fact_Table, date >= _start_date && date <= _end_date))

 

Can anyone please help me achieve this. @GilbertQ @amitchandak @Greg_Deckler 

1 ACCEPTED SOLUTION
sahildoshi
Helper I
Helper I

Got it, I was missing the ALL clause in my DAX.

95%tile_Measure = 
var _end_date = MAX(date)
var _start_date = _start_date - 365
RETURN CALCULATE(PERCENTILE.INC(low_balance, 0.95), ALL(date), date >= _start_date && date <= _end_date)

View solution in original post

1 REPLY 1
sahildoshi
Helper I
Helper I

Got it, I was missing the ALL clause in my DAX.

95%tile_Measure = 
var _end_date = MAX(date)
var _start_date = _start_date - 365
RETURN CALCULATE(PERCENTILE.INC(low_balance, 0.95), ALL(date), date >= _start_date && date <= _end_date)

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors