Forum Discussion
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.
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 )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.
3 Replies
- lbendlinSuper 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"
- danextianSuper 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 ) - v-ssriganeshCommunity 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.