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
palchaw
Frequent Visitor

Filter with OR behavior/dynamic measure based on slicer

Hello,

 

I have a simple table visual as illustrated below. The goal of this table is to show which Codes meet the criteria defined in the three slicers shows on the same page (Metric1 and Metric2 are Between slicers, Status is a simple Dropdown)

CodeMetric1Metric2Status
Red.6500A
Green  B
Blue.46000A

 

 

The issue I am running into is when I change the Metric1 or Metric 2 slicers to anything that doesn't include 0 in the range, everything that has a Status of B is filtered out of the table visual.

I'm not sure how a solution would be crafted, but the ideal output table keeps all records with Status B, regardless of what ranges the Metric slicers are adjusted to and only adjusts the records for Status A.

3 REPLIES 3
Anonymous
Not applicable

Hi @palchaw ,

Could you provide some raw data in your tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples? Later we can create a measure as below to replace the original calculated column to get the expected result. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

Best Regards

palchaw
Frequent Visitor

In your example, would this involve creating a separate table called "Slicers" that has two columns, one for each Metric, and two records, one with the Max and one with the Min? Is a relationship required between this new table and the main fact table?


Example:

Metric1Metric2
0-10,000
110,000
Shravan133
Super User
Super User

Try this:

 Metric Filter Measure =
IF(
SELECTEDVALUE('Table'[Status]) = "B",
1,
IF(
'Table'[Metric1] >= MIN('Slicers'[Metric1 Min]) &&
'Table'[Metric1] <= MAX('Slicers'[Metric1 Max]) &&
'Table'[Metric2] >= MIN('Slicers'[Metric2 Min]) &&
'Table'[Metric2] <= MAX('Slicers'[Metric2 Max]),
1,
0
)
)

 

  • Add the new measure Metric Filter Measure to the Filters pane of your table visual.
  • Set the filter condition to show only rows where the measure is equal to 1 (i.e., rows that meet the slicer criteria for Status A or that have Status = B).

 

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.