Forum Discussion

vr_2020's avatar
vr_2020
Frequent Visitor
5 years ago
Solved

Hierarchy Slicer

 

I have a scenario where the data in a Table is available in column wise as follows:

Continents

Countries

Cities

ASIA

INDIA

CHENNAI

ASIA

INDIA

MUMBAI

ASIA

INDIA

DELHI

ASIA

CHINA

BEIJING

EUROPE

FRANCE

PARIS

EUROPE

NETHERLANDS

AMSTERDAM

EUROPE

NETHERLANDS

UTRECHT

 

 I am creating a Slicer with Header as “Territory” and placing the above said column values in a form of Hierarchy as marked in the following screenshot

 

 

 

Step 1:

Drop Down slicer that has been created

 

Step 2:

Selecting CHENNAI

 

 

Step 3:

If I look at the display text at the top of slicer just below Slicer header Territory, it shows “ASIA (Continents) + INDIA (Count…”

 

I presume it is the default behavior both in Power BI Desktop and Power BI Service when we have Hierarchy scenario if I am not wrong? Can someone please confirm?

 

However, please let me know is there anyway that we can show only the value that I have selected in the Drop Down to be displayed. In this case, the display should show me only “CHENNAI” rather than “ASIA (Continents) + INDIA (Count…)”  irrespective of whatever the Slicer’s Height and Width? 

 

Thanks

 

  • Hi, vr_2020 

     

    Try like this:

    Measure = 
    SWITCH (
        TRUE (),
        ISFILTERED ( 'Table'[Column3] ), MAX ( 'Table'[Column3] ),
        ISFILTERED ( 'Table'[Column2] ),
        MAX ( 'Table'[Column2] ), 
        ISFILTERED ( 'Table'[Column1] ), MAX ( 'Table'[Column1] ),
        " "
    )
    

     

    Best Regards

    Janey Guo

     

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

     

6 Replies

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Icon for Community Support rankCommunity Support

    Hi, vr_2020 

     

    I checked it, and what you said should be a design and cannot be changed. If you don’t mind, you can create a measure and put it in the card visual and put the card visusl on top of the slicer.

    Like this:

    Measure = IF(ISFILTERED('Table'[Column3]),MAX('Table'[Column3])," ")

    Best Regards

    Janey Guo

     

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

     

    • vr_2020's avatar
      vr_2020
      Frequent Visitor

      Thanks Janey. Ideas looks great. It matches bit close to what I am looking for. I have got 5 hierarchy slicers which has got different levels of hierarchy in each of them in Main Page and the same is being used across multiple pages on the dashboard. Adding Card Visuals on top of the Slicers which is something I will have to think about it interms of having number of visual count on each page.

      • v-janeyg-msft's avatar
        v-janeyg-msft
        Icon for Community Support rankCommunity Support

        Hi, vr_2020 

         

        Try like this:

        Measure = 
        SWITCH (
            TRUE (),
            ISFILTERED ( 'Table'[Column3] ), MAX ( 'Table'[Column3] ),
            ISFILTERED ( 'Table'[Column2] ),
            MAX ( 'Table'[Column2] ), 
            ISFILTERED ( 'Table'[Column1] ), MAX ( 'Table'[Column1] ),
            " "
        )
        

         

        Best Regards

        Janey Guo

         

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

         

  • Nathaniel_C's avatar
    Nathaniel_C
    Icon for Community Champion rankCommunity Champion

    Hi vr_2020 , you are right about default behavior, but I noticed that you did not set this value as a hierachy.

     

     

    See the pic above, the upper set is set as a hierachy, and I turned of the title.  Perhaps closer to what you are looking to doing?
    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
    Nathaniel

    • vr_2020's avatar
      vr_2020
      Frequent Visitor

      Thanks Nathaniel_C for the quick reply. I don't think setting up as a Hierarchy and turning off the Title will  have an significant impact on the default behavior about the point (as marked in red) that I am looking for.