Forum Discussion
Create a dynamic filter based on another one
- 6 years ago
Hi, Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end,
Table:
Zones:
You may create a measure as below.
Visual Control = IF( HASONEVALUE(Zones[Zone]), SWITCH( SELECTEDVALUE(Zones[Zone]), "Zone 1", IF( SELECTEDVALUE('Table'[Year]) in {1990,1995,2002,2003,2004}, 1,0 ), "Zone 2", IF( SELECTEDVALUE('Table'[Year]) in {2005,2006,2009}, 1,0 ),0 ),0 )Finally you need to put the measure in the visual level filter to get the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end,
Table:
Zones:
You may create a measure as below.
Visual Control =
IF(
HASONEVALUE(Zones[Zone]),
SWITCH(
SELECTEDVALUE(Zones[Zone]),
"Zone 1",
IF(
SELECTEDVALUE('Table'[Year]) in {1990,1995,2002,2003,2004},
1,0
),
"Zone 2",
IF(
SELECTEDVALUE('Table'[Year]) in {2005,2006,2009},
1,0
),0
),0
)
Finally you need to put the measure in the visual level filter to get the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.