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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Enforcer274
Frequent Visitor

Filtering values within 10th & 90th percentile

Hi, I am trying to remove outliers from by data set using any data between the 10th and 90th percentile. And get the average of the new filtered dataset.

Data

PN In: Part Number

Reference: Specific order number (Subcategory to PN)

Count Parts: Number of PN
RTAT: amount of time we take to complete the part,

          +ve RTAT is within limits, -ve RTAT means were behind schedule

10%RTAT: 10th percentile of RTAT

 

10%RTAT = PERCENTILE.INC(WS[RTAT],0.1)

 

90%RTAT: 90th percentile of RTAT

 

90%RTAT = PERCENTILE.INC(WS[RTAT],0.9)

 

FilterRTAT: Using 10% & 90% RTAT to get value within range and make value out of range = 0

I found that this does not work as it take the individual 10% & 90% of each reference number and us it in the if statement which results to everything is within limits. As shown below

 

 

FilterRTAT = IF(WS[RTAT]<=[90%RTAT] && WS[RTAT]>=[10%RTAT],WS[RTAT],BLANK())

 

Fig 1Fig 1

 

FilterRTAT V2: I found this formula online. It is basically the same thing but it uses the total 10% & 90% of the whole dataset in the if statement. As shown below, for PN /2687A...., -473.40 & 13.00 is taken as the filter value for FilterRTAT V2, which is not what I want.

 

So as an example, I want PN /2687A.... to be filtered --> anything between -700 & -86.40 to remain the same and anything outside that range to be blank() or 0. the above value is shown in green in Fig 3.

 

And same for the different PN with thier own respective 10th & 90th percentile range.

 

 

FilterRTAT V2 = 
VAR Q4RTAT =
    PERCENTILE.INC(WS[RTAT],0.9)
RETURN 
VAR Q1RTAT =
    PERCENTILE.INC(WS[RTAT],0.1)
RETURN
IF(WS[RTAT]<=Q4RTAT && WS[RTAT]>=Q1RTAT,WS[RTAT],BLANK())

 

 

Fig 2Fig 2Fig 3Fig 3

This is an overview of my dashboard

Fig 4Fig 4

Question: So does anyone know how to filter values between 10 & 90 percentile of different categories (PN in) within a dataset. Or assign 10 & 90 percentile to different categories based on the calculations. If yall need any more dataset or examples, Im able to provide.

2 REPLIES 2
lbendlin
Super User
Super User

Great question. Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. 

Sorry for the late reply, i dont really know how to share datasets. But heres the link for my PowerBI file. https://app.powerbi.com/links/HXInX4gsO5?ctid=7604ff02-abd8-45db-8cac-550054323fc9&pbi_source=linkSh...

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.