Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Dynamic Title - Multiple Selections

Here's my current formula: 

 

Selected Zone = var selectedcolor = SELECTEDVALUE('All Data'[Zone]) return "Zone: "& IF(ISBLANK(selectedcolor), "All", selectedcolor) 

 

However, when I select more than one zone, it appears as "All". Here is a picture:

 

https://imgur.com/a/OgNquhP

 

My question is, how can I get it to display the text of what I'm selecting?

  • Hi Anonymous

     

    You may try to use below measure. Here is the reference for you.

    Selected Zone =
    VAR selectedcolor =
        VALUES ( 'All Data'[Zone] )
    RETURN
        "Zone: "
            & IF (
                COUNTROWS ( selectedcolor ) = COUNTROWS ( ALL ( 'All Data'[Zone] ) ),
                "All",
                CONCATENATEX ( VALUES ( 'All Data'[Zone] ), 'All Data'[Zone], "," )
            )

    Regards,

    Cherie

4 Replies

  • v-cherch-msft's avatar
    v-cherch-msft
    Microsoft Employee

    Hi Anonymous

     

    You may try to use below measure. Here is the reference for you.

    Selected Zone =
    VAR selectedcolor =
        VALUES ( 'All Data'[Zone] )
    RETURN
        "Zone: "
            & IF (
                COUNTROWS ( selectedcolor ) = COUNTROWS ( ALL ( 'All Data'[Zone] ) ),
                "All",
                CONCATENATEX ( VALUES ( 'All Data'[Zone] ), 'All Data'[Zone], "," )
            )

    Regards,

    Cherie

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks v-cherch-msft. This works for the most part.

       

      However, when all my zones are selected it displays every single name. Can we get it to just say "All" when I have all my zones selected? This would be my default view.

       

      EDIT: Nevermind v-cherch-msft. I've got it working now.

       

       

      • KarenF's avatar
        KarenF
        New Member

        Hi Anonymous

         

        Can you please share your fix with me. I'm struggling to get mine to work when all are selected. Like you, when I slected all, the title listed everything instead of saying 'All Selected'. However it works great when selecting individual ones. So if 3 name selected it shows those 3 names

         

        Many thanks

        Karen