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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aagrawal124
Frequent Visitor

Percentile calculation not working properly with filter

Hey everyone,

 

I have created some calculated columns to get 50th, 60th, 70th percentile of a column in a table.

 

Cal_P50 = PERCENTILE.INC('Table'[percentile_column_name],.50)
Cal_P60 = PERCENTILE.INC('Table'[percentile_column_name],.50)
Cal_P70 = PERCENTILE.INC('Table'[percentile_column_name],.50)
 
This does not work properly when it needs to be used with a slicer on another column present in the table. That is, any selection on the slicer does NOT change the values of Cal_P50, Calc_P60 and Calc_P70.
 
I created a calculated table that would get filtered on the slicer selection, and tried using the same method, but that does not work as well.
 
Is there a way to pass filtered column values as first parameter of percentile function? I tried usind SELECTCOLUMNS, but doesn't help me.
 
aagrawal124_0-1633671782994.png

 

Any help would be highly appreciated.

 

Regards,

Ayushi Agrawal

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@aagrawal124 

You have to refer to a column to get the percentile. If you your model has correct relationship settled, you can just use the column(a list of filtered value) as the slicer, the percentile measures should filtered automatically. 

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@aagrawal124 

You have to refer to a column to get the percentile. If you your model has correct relationship settled, you can just use the column(a list of filtered value) as the slicer, the percentile measures should filtered automatically. 

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@aagrawal124 , What does selectcolumns doing there. It returns table.

Selectcolumn inside table , something is not correct

yes, right. I was assuming that SELECTCOLUMNS would return the column, and then it can pe passed to PERCENTILE function.

 

is there any way I can pass FILTERED column to PERCENTILE function..(a list of filtered value which would contain only rows corresponding to slicer selection)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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