Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Create a dynamic filter based on another one

Greeting lovely members . 

 

im trying to create a dynamic filter based on another filter . 

an Exemple : 

 

so let's say i have a filter called Years and another filter called Zone  . 

 

what im trying to do is that when i select Zone 1 i want to have a multiselection on the years filter . 

 

i select Zone 1 => in the years filter i have 5 years selected ( 1990- 1995- 2002 - 2003 - 2004 ) 

if i select Zone 2 => in the years filter i have 3 years selected ( 2005-2006-2009)

 

i hope my exemple is clear 

 

Thanks all in Advance . 

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end,

Table:

d1.png

 

Zones:

d2.png

 

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.

d3.png

d4.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end,

Table:

d1.png

 

Zones:

d2.png

 

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.

d3.png

d4.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , What I getting that you want filters to dependent on each other. For that take a measure from fact and use that in visual level filter. Check value is not blank .

 

refer :https://www.youtube.com/watch?v=cyOquvfhzNM

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.