cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tober1996
Frequent Visitor

Filtered Options as dynamic title

Hello community,
I'd like to get the selected filter (in my case these are cities) as a title on my dashboard. This measure works fine, when nothing or ONE option is selected, but I also want to get a sensful title if more then on option (two or more cities) ist selected. 
At least one statement like "More than one Town", at best the list of the selected cities.

--------------------------------
1 City Filter title =
2 VAR SelectedSite = SELECTEDVALUE(IdeaCities[City])
3 RETURN
4 IF(ISBLANK(SelectedSite);
5 "All";
6 SelectedSite)

---------------------------------

Thanks for help 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Filtered Options as dynamic title

Hello @Tober1996 ,
Based on the above logic, there is a simpler way.

Selected City Name = IF(ISFILTERED(myTable[Cities]), "Selected: " & CONCATENATEX(VALUES(myTable),myTable[Cities],", "),"Selected: All cities ")

 
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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Super User IV
Super User IV

Re: Filtered Options as dynamic title

Hi @Tober1996 ,
Try this:
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

 

 

 

 

City Filter title =
VAR _Selected =
    SELECTEDVALUE ( myTable[Cities] )
RETURN
    IF (
        ISBLANK ( _Selected ),
        "Choose one city from this list "
            & CONCATENATEX ( VALUES ( myTable ), myTable[Cities], ", " ),
        _Selected
    )

 




city1.PNG

 

city.PNG

 

 

city12.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Tober1996
Frequent Visitor

Re: Filtered Options as dynamic title

Hello Nathaniel, that is nearly perfect, but it should not be a request for selection, but a note/title (in a card) what is selected.

With your measure  -if nothing was selected- every cities are displayed.
The solution should be:
- nothing selected: "Selected: All cities"
- London selected: "Selected: London"
- London and Paris and Rome selected: "Selected: London, Paris, Rome"

Can you modify the measure to this function?

Highlighted
Super User IV
Super User IV

Re: Filtered Options as dynamic title

Hello @Tober1996 ,
Based on the above logic, there is a simpler way.

Selected City Name = IF(ISFILTERED(myTable[Cities]), "Selected: " & CONCATENATEX(VALUES(myTable),myTable[Cities],", "),"Selected: All cities ")

 
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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Helpful resources

Announcements
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.