Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Selected slicer

Hi, i have a selected slicer in Tableau same i want to implement it in Power BI  I have 5 column called level 1 to level 5  i want to show them in a slicer so i have created disconnected table  and...
  • v-sshirivolu's avatar
    v-sshirivolu
    1 year ago

    Hi Anonymous 

    To handle the scenario based on the slicer selection from a disconnected table (ANZSIC_Level_Selector), the following measure can be used to conditionally show rows depending on which level is selected:

     

    Show Row? = 
    VAR SelectedLevel = SELECTEDVALUE('ANZSIC_Level_Selector'[SelectedLevel])
    RETURN 
    SWITCH(
        TRUE(),
        SelectedLevel = "ANZSIC Level 1", NOT(ISBLANK('Data Table'[ANZSIC Level 1])),
        SelectedLevel = "ANZSIC Level 2", NOT(ISBLANK('Data Table'[ANZSIC Level 2])),
        SelectedLevel = "ANZSIC Level 3", NOT(ISBLANK('Data Table'[ANZSIC Level 3])),
        TRUE(), 1
    )

    This measure shows 1 only for rows where the selected slicer level's column isn't blank, with a fallback to handle no selection. Add it to your table visual and filter for Show Row? = 1 to display only relevant rows.

     

    If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it

    Best Regards,
    Sreeteja.
    Community Support Team