Forum Discussion
Create a Table with Multiple OR Filters
- 1 year ago
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 ) - 1 year ago
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.
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.