Forum Discussion
use multiple (multiple select) slicers to filter a table but have none selected as an option
- Anonymous1 year ago
Hi Neiners ,
Thanks for the follow-up.
The behavior you're seeing where everything shows 1 by default and turns to 0 on slicer selection suggests that SELECTEDVALUE or direct column references inside CONTAINSSTRING might not be resolving row by row in the visual. This usually happens when the FilterFlag measure is placed directly into the visual-level filter without an iterator to force evaluation per row.
To address this, I reproduced your scenario with disconnected slicers, partial text matching, and a table visual that should respect slicer filters only when selections are made.
Steps Taken to Repro:
1. Created a table TableData with columns Column1, Column2.2. Created disconnected slicer tables Slicer1, Slicer2, each with sample values.
3. Used CONTAINSSTRING to match text in each slicer to the respective columns and wrapped everything inside SUMX(TableData, ...) to force row-wise evaluation.
FilterFlag = SUMX ( TableData, VAR _s1Match = IF ( ISFILTERED(Slicer1[SlicerValue]), MAXX ( FILTER ( Slicer1, CONTAINSSTRING ( TableData[Column1], Slicer1[SlicerValue] ) ), 1 ), 1 ) VAR _s2Match = IF ( ISFILTERED(Slicer2[SlicerValue]), MAXX ( FILTER ( Slicer2, CONTAINSSTRING ( TableData[Column2], Slicer2[SlicerValue] ) ), 1 ), 1 ) RETURN IF (_s1Match * _s2Match = 1, 1, 0) )4. Applied FilterFlag = 1 in the visual-level filter for the table visual.
Filtering:
Hope this helps. Please reach out for further assistance.
If you continue to face issues, feel free to share a small PBIX file (with sensitive data removed), and we can take a closer look.
If this post helps, then please consider to give a kudos and Accept as the solution to help the other members find it more quickly.
Thank you.Attaching .pbix file for reference.
Hi Neiners ,
Thanks for the follow-up.
The behavior you're seeing where everything shows 1 by default and turns to 0 on slicer selection suggests that SELECTEDVALUE or direct column references inside CONTAINSSTRING might not be resolving row by row in the visual. This usually happens when the FilterFlag measure is placed directly into the visual-level filter without an iterator to force evaluation per row.
To address this, I reproduced your scenario with disconnected slicers, partial text matching, and a table visual that should respect slicer filters only when selections are made.
Steps Taken to Repro:
1. Created a table TableData with columns Column1, Column2.
2. Created disconnected slicer tables Slicer1, Slicer2, each with sample values.
3. Used CONTAINSSTRING to match text in each slicer to the respective columns and wrapped everything inside SUMX(TableData, ...) to force row-wise evaluation.
FilterFlag =
SUMX (
TableData,
VAR _s1Match =
IF (
ISFILTERED(Slicer1[SlicerValue]),
MAXX (
FILTER (
Slicer1,
CONTAINSSTRING ( TableData[Column1], Slicer1[SlicerValue] )
),
1
),
1
)
VAR _s2Match =
IF (
ISFILTERED(Slicer2[SlicerValue]),
MAXX (
FILTER (
Slicer2,
CONTAINSSTRING ( TableData[Column2], Slicer2[SlicerValue] )
),
1
),
1
)
RETURN
IF (_s1Match * _s2Match = 1, 1, 0)
)
4. Applied FilterFlag = 1 in the visual-level filter for the table visual.
Filtering:
Hope this helps. Please reach out for further assistance.
If you continue to face issues, feel free to share a small PBIX file (with sensitive data removed), and we can take a closer look.
If this post helps, then please consider to give a kudos and Accept as the solution to help the other members find it more quickly.
Thank you.
Attaching .pbix file for reference.
Thank You! Thank You! and Thank You again! It has worked for up to 3 slicers with multiple selections on each slicer. This is a game changer for me.
- Anonymous1 year agoNot applicable
You're very welcome! Great to hear it worked well for your scenario.
To add more slicers, just extend the same pattern using additional ISFILTERED and CONTAINSSTRING checks for each one.
Let us know if you need any further assistance.
Thanks again for confirming.
Please continue using the Fabric Community for any future queries - we're happy to help.
Best Regards,
Vinay
Community Support Team