Forum Discussion
Anonymous
4 years agoNot applicable
How to apply a filter to multiple columns
I pretty new to Power BI and i have been trying to create a filter to show me which countries the names have been to but what happens is it only applies to the column "Country 1" Name Country...
- 4 years ago
Hi, Anonymous
You can create a new measure and apply it to visual filter pane:
filter1 = VAR a = IF ( SELECTEDVALUE ( Table1[Country 1] ) IN VALUES ( Country[Country Name] ) || SELECTEDVALUE ( Table1[Country 2] ) IN VALUES ( Country[Country Name] ) || SELECTEDVALUE ( Table1[Country 3] ) IN VALUES ( Country[Country Name] ), 1, 0 ) RETURN IF ( ISFILTERED ( Country[Country Name] ), a, 0 )Best Regards,
Community Support Team _ Eason
v-easonf-msft
Community Support
4 years agoHi, Anonymous
You can create a new measure and apply it to visual filter pane:
filter1 =
VAR a =
IF (
SELECTEDVALUE ( Table1[Country 1] )
IN VALUES ( Country[Country Name] )
|| SELECTEDVALUE ( Table1[Country 2] )
IN VALUES ( Country[Country Name] )
|| SELECTEDVALUE ( Table1[Country 3] ) IN VALUES ( Country[Country Name] ),
1,
0
)
RETURN
IF ( ISFILTERED ( Country[Country Name] ), a, 0 )
Best Regards,
Community Support Team _ Eason
- kmelloCFO2 years agoNew Member
Hi there,
I have a similar situation and have attempted this solution but the filter does not produce the results in the original table to then filter by. The answer is always 0 no matter which value is selected.
Thanks
- ericcartman2 years agoRegular VisitorDid you ever figure out this problem? I am having the exact same issue right now