Forum Discussion
Multiple Contains Filters using Visual Filters
- 4 years ago
Hi MAPM
Please refer to sample file with the proposed solution https://www.dropbox.com/t/Nd2LhJFlC0H1ZlwJThis requires creating a filter table with the desired strings. Can be created with code if you give more details. For now I created with hard code.
Then create the filter measure, place it in the filter pane, select "Is not blank" and apply the filter.
FilterMeasure = IF ( COUNTROWS ( ALL ( FilterTable[Selection] ) ) <> COUNTROWS ( ALLSELECTED ( FilterTable[Selection] ) ), COUNTROWS ( FILTER ( VALUES ( FilterTable[Selection] ), CONTAINSSTRING ( SELECTEDVALUE ( DimID[Name] ), FilterTable[Selection] ) ) ), 1 )
Hi MAPM
Yes possible. Would you please provide some sample data along with the expected result?
- MAPM4 years agoFrequent Visitor
It's very similar to the question I linked to, but to provide an example.
I have a dimension table with 1000s of rows, for example:
Id Name 1 ABCZZZZ 2 ABCZZZX 3 ABCZZZY 4 AAAZZZZ 5 AAAZZZY 6 AAAZZZX 7 AAAZZZC 8 asdf 9 assdf 10 fffaaf 11 fffffff
This Dimension table links to several metric tables.
I am trying to filter the full report based on filtering this dimension "Name" column, using a contains of several strings (give or take 12 strings).
To simplify & using the example above. Imagine I'd like to filter the Dimension table for any string that contains:
"ABC", "fffa", "asdf"
I would expect the corresponding Dimension table to then filter to:Id Name 1 ABCZZZZ 2 ABCZZZX 3 ABCZZZY 8 asdf 10 fffaaf Which would in turn filter my metric tables.
Normally I'd create a Calculated column that would help me achieve this, but that's not an option for my current setup (because I'm reporting using a Cube that is owned and maintained by another team).