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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
charonT
Helper I
Helper I

To remove a filter in a visual and re-add a filter in DAX

Hello, I have a table containing extensive provider data, and the Scatter chart currently applies a filter 'test'[Provider]="B" to display data specific to this provider. However, I aim to calculate a percentile for this provider among all providers. The criteria for inclusion in the ranking calculation are as follows: If [provider]="B" and sum([denominator]) is greater than or equal to 2, then 'B' will be considered. Simultaneously, for other providers, if [provider]<>"B" and [denominator] is greater than or equal to 3, those providers will be included in the calculation.

 

I have implemented DAX calculations for YoY change and percentile. The Scatter chart is configured with the x-axis representing YoY change and the y-axis representing the percentile. However, the visualization does not align with my expectations.

 

The following screenshoots are the examples of the trial data. This is the pbix file of it,

https://drive.google.com/file/d/1ilhuv5fh2hDdrcH3uLI4V2wkeYb5hhBg/view?usp=drive_link

 

charonT_3-1706696372873.png

 

 

charonT_1-1706696267622.png

charonT_2-1706696315216.png

In my real dataset, when the denominator does not meet the threshold (i.e., 3 in the attached example) for other providers, the data points are placed at the top of the chart with a ranking of 1/1. But the rest of it is fine.

charonT_4-1706696728060.png

Thank you in advance.

2 REPLIES 2
AmiraBedh
Super User
Super User

I am assuming the following :

Adjusted Percentile = 
VAR CurrentProvider = MAX(test[Provider])  // Get the current provider
VAR SumDenominator = SUM(test[denominator])  // Sum of denominator for the current context
RETURN
IF(
   (CurrentProvider = "B" && SumDenominator >= 2) ||
   (CurrentProvider <> "B" && SumDenominator >= 3),
   PERCENTILEX.INC(
       FILTER(
           ALL(test),
           (test[Provider] = "B" && test[denominator] >= 2) ||
           (test[Provider] <> "B" && test[denominator] >= 3)
       ),
       [YourMeasure], // Replace with the measure you're calculating the percentile for
       0.5
   ),
   BLANK()
)

 

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Hi Thank you for your reply. It seems this is not working, in my personal data, this DAX did not return the percentile of each class among the providers, instead, it returns an overall percentile, regardless of the class

charonT_0-1706706663314.png

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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