Forum Discussion
Create country filter for two tables
- Anonymous4 years ago
Hi Roym ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create country dimension table just as suggested by amitchandak and PaulDBrown and apply the country as slicer option
Note: Please DON'T create any relationship between country dimension table and your fact tables(Controls and Issues table)
Countries = DISTINCT(UNION(ALL(Controls[Country]),ALL(Issues[Country])))2. Create a measure as below
Measure = VAR _selcountries = ALLSELECTED ( 'Countries'[Country] ) RETURN IF ( SELECTEDVALUE ( 'Controls'[Country] ) IN _selcountries || SELECTEDVALUE ( 'Issues'[Country] ) IN _selcountries, 1, 0 )3. Create table visuals and apply visual level filter with condition(Measure=1) just as shown in below screenshot
Best Regards
Hi Roym ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create country dimension table just as suggested by amitchandak and PaulDBrown and apply the country as slicer option
Note: Please DON'T create any relationship between country dimension table and your fact tables(Controls and Issues table)
Countries = DISTINCT(UNION(ALL(Controls[Country]),ALL(Issues[Country])))
2. Create a measure as below
Measure =
VAR _selcountries =
ALLSELECTED ( 'Countries'[Country] )
RETURN
IF (
SELECTEDVALUE ( 'Controls'[Country] )
IN _selcountries
|| SELECTEDVALUE ( 'Issues'[Country] ) IN _selcountries,
1,
0
)
3. Create table visuals and apply visual level filter with condition(Measure=1) just as shown in below screenshot
Best Regards
This is great! Works perfectly. Thanks for the help!!!