Forum Discussion
marama
Helper I
4 years agoFilter Table based on slicer value and multiple conditions
Hi. I have a table with flights, source and destination cities. In slicer, I have a list of cities. I need a visual table to list all entries where selected city is either a source or a destinati...
- 4 years ago
Hi, marama
You can create a measure to filter table visual:
Try measure as below:
filter = VAR a = IF ( SELECTEDVALUE ( 'Table'[destination] ) IN VALUES ( City[city] ) || SELECTEDVALUE ( 'Table'[source] ) IN VALUES ( City[city] ), 1, 0 ) RETURN IF ( ISFILTERED ( City[city] ), a, a )Then apply it to visual filter pane.
Please let me know if I misunderstood.
Best Regards,
Community Support Team _ Eason
marama
Helper I
4 years agoThank you, but join turned out to be too slow in my case (I have more then 100K records)
v-easonf-msft
Community Support
4 years agoHi, marama
You can create a measure to filter table visual:
Try measure as below:
filter =
VAR a =
IF (
SELECTEDVALUE ( 'Table'[destination] )
IN VALUES ( City[city] )
|| SELECTEDVALUE ( 'Table'[source] ) IN VALUES ( City[city] ),
1,
0
)
RETURN
IF ( ISFILTERED ( City[city] ), a, a )
Then apply it to visual filter pane.
Please let me know if I misunderstood.
Best Regards,
Community Support Team _ Eason