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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sarath5140
Helper I
Helper I

Calculating 90th percentile and group by column with date filter

Hi,

 

I am stuck with the below problem and need your help and inputs to solve my below problem.

 

I have table with the below data. Here T1,T2,T3 are in minutes and date column also available.

 

CategoryIDT1T2T3Date
Factory1017217992510350108401/25/2019
Factory7714562011276011/10/2018
Factory223458301308382/25/2017
Factory34562564540409/21/2018
Outlet2245681121121610/29/2018
Outlet59564656907208/6/2018
Outlet228765231304059/12/2018
Support1278961866212/19/2019
Support1125678565367/21/2018
Support3245675106122/4/2018
Support22879611224512/19/2018

 

Based on this table data, I wanted my output to look like this

 

CategoryID(count)T1(m)T2(m)T3(m)
Factory47037.87583.17606
Outlet319.45781116.8
Support440.763.8618.3
Total 563861826308

 

Example : For Category Factory, I wanted to calculate the 90th percentile for T1(m) from TableA data with the fomula like = percentile.Inc([9925,20,301,45],0.90) which gives me the ouput value equals 7037.8 and for Total in the ouput also would like to calculate the 90th percentile for T1(m) equals 5638 using the same formula.

 

Note :- I need to have the date filter applied on the output table when i select the date range my output values should change accordingly including with my total 90th percentile values as well.

 

I was able to get the output for somepart but my problem is I am unable to apply the date filter. Can anyone please look in to my problem and give me the samples.

 

Really appreciate your help!

 

Thanks

 

 

1 ACCEPTED SOLUTION

@sarath5140 ,

 

I am afraid this couldn't be achieved because the total/grand total is just summed up automatically by power bi. So I would suggest you to create an additional measure to calculate the 90% of the result.

 

Community Support Team _ Jimmy Tao

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

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@sarath5140 ,


Example : For Category Factory, I wanted to calculate the 90th percentile for T1(m) from TableA data with the fomula like = percentile.Inc([9925,20,301,45],0.90) which gives me the ouput value equals 7037.8 and for Total in the ouput also would like to calculate the 90th percentile for T1(m) equals 5638 using the same formula.

 

Note :- I need to have the date filter applied on the output table when i select the date range my output values should change accordingly including with my total 90th percentile values as well.

 

I was able to get the output for somepart but my problem is I am unable to apply the date filter. Can anyone please look in to my problem and give me the samples.



Based on the senario above, you may have added ALLSELECTED(Table[Date]) to apply the date slicer on the result but this filter may be removed by other function though I don't know what function you are using. Maybe the measure should be like pattern below:

 

Result =
CALCULATE (
    PERCENTILE.INC ( Table[T1], 0.9 ),
    FILTER (
        ALLEXCEPT ( Table, Table[Category] ),
        Table[Date] IN VALUES ( Table[Date] )
    )
)

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yuta-msft 

 

Thanks for your reply.

 

with your measure I am able to calculate the percentiles but my problem is I should be able to calculate the 90th percentile for my output table Total row as well. Can you help me how to do that?

 

Thanks

@sarath5140 ,

 

I am afraid this couldn't be achieved because the total/grand total is just summed up automatically by power bi. So I would suggest you to create an additional measure to calculate the 90% of the result.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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