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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
hubnerj
Regular Visitor

Create a Table with Multiple OR Filters

Is there some way I can create a customer filter for a single Table Visualization that accomplishes the following:

 

Status=Submitted AND ModDiff>14

OR

Status=Active AND ModDiff>21

OR

Status=On Hold AND ModDiff>28

 

Thanks in advance.

2 ACCEPTED SOLUTIONS
danextian
Super User
Super User

Hi @hubnerj 

Assumign ModDiff is a measure, crate this measure and use it as a visual filter = 1

ConditionFlag = 
VAR StatusValue = SELECTEDVALUE('Table'[Status])
RETURN 
    SWITCH(
        TRUE(),
        StatusValue = "Submitted" && [ModDiff] > 14, 1,
        StatusValue = "Active" && [ModDiff] > 21, 1,
        StatusValue = "On Hold" && [ModDiff] > 28, 1,
        0
    )




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

v-ssriganesh
Community Support
Community Support

Hi @hubnerj,
Thank you for reaching out to the Microsoft Fabric Forum Community.

I have reproduced your scenario using sample data, and I am attaching the .pbix file for your reference. To achieve the filtering condition in a report, I created a calculated column using the below DAX formula:

CustomFilter =

VAR StatusCheck = TRIM( LOWER( 'Table'[Status] ) )

RETURN

IF(

    ( StatusCheck = "submitted" && 'Table'[ModDiff] > 14) ||

    ( StatusCheck = "active" && 'Table'[ModDiff] > 21) ||

    ( StatusCheck = "on hold" && 'Table'[ModDiff] > 28),

    1,

    0

)

 

Steps I followed:

  • Created a calculated column using the above DAX formula.
  • Added a table visualization with ID, Status, ModDiff, and CustomFilter.
  • Applied a filter on the table visualization to show only rows where CustomFilter = 1.

This ensures that only the records matching your conditions appear in the table.

If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

View solution in original post

3 REPLIES 3
v-ssriganesh
Community Support
Community Support

Hi @hubnerj,
Thank you for reaching out to the Microsoft Fabric Forum Community.

I have reproduced your scenario using sample data, and I am attaching the .pbix file for your reference. To achieve the filtering condition in a report, I created a calculated column using the below DAX formula:

CustomFilter =

VAR StatusCheck = TRIM( LOWER( 'Table'[Status] ) )

RETURN

IF(

    ( StatusCheck = "submitted" && 'Table'[ModDiff] > 14) ||

    ( StatusCheck = "active" && 'Table'[ModDiff] > 21) ||

    ( StatusCheck = "on hold" && 'Table'[ModDiff] > 28),

    1,

    0

)

 

Steps I followed:

  • Created a calculated column using the above DAX formula.
  • Added a table visualization with ID, Status, ModDiff, and CustomFilter.
  • Applied a filter on the table visualization to show only rows where CustomFilter = 1.

This ensures that only the records matching your conditions appear in the table.

If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

danextian
Super User
Super User

Hi @hubnerj 

Assumign ModDiff is a measure, crate this measure and use it as a visual filter = 1

ConditionFlag = 
VAR StatusValue = SELECTEDVALUE('Table'[Status])
RETURN 
    SWITCH(
        TRUE(),
        StatusValue = "Submitted" && [ModDiff] > 14, 1,
        StatusValue = "Active" && [ModDiff] > 21, 1,
        StatusValue = "On Hold" && [ModDiff] > 28, 1,
        0
    )




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
lbendlin
Super User
Super User

For a single column:  Use a Basic filter .  Select three values. Then switch to Advanced filter.

 

For more complex filters like your example use a measure that yields 1 (when one of the  conditions is true) or 0. Then use the measure as a visual filter and set the filter to "equals 1"

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors