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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Syndicate_Admin
Administrator
Administrator

Dynamic Title According to Multiple Selectors

Dear friends, how are you?

I have the following dynamic title, and I configured it in such a way that if I have in the "Channel" field the options "Retail" and "Institutions" are selected, the result gives me "Retail + Institutions", the same for the "Country" field, if I have "National" and "International" selected, I get "National+International".

As the GDP gives you the option that if no option in the field is selected, it assumes that all of them were selected, therefore, the same exercise as the previous one, no "Channel" selected, no "Retail+Institutions" or no "Country" selected, the result is "National+International".

The problem is that the title, when I have multiple options selected, throws me empty.

Graphic Title = "Sales"&SELECTEDVALUE(Total[Brand (CeBe)])&" en "&SELECTEDVALUE('Metrics'[Metric])&" canal "&
SWITCH(TRUE(),
SELECTEDVALUE(Total[Canal])="Retail","Retail",
SELECTEDVALUE(Total[Canal])="Institutions","Institutions",
SELECTEDVALUE(Total[Canal]) IN {"Retail","Institutions"},"Retail+Institutions",
"")
&" "&SWITCH(TRUE(),
SELECTEDVALUE(Total[Country])="National","National",
SELECTEDVALUE(Total[Country])="International","International",
SELECTEDVALUE(Total[Country]) IN {"National","International"}, "National+International",
"")
Thank you very much in advance.
Best regards!
2 REPLIES 2
barritown
Super User
Super User

Hi @MatiasBI1986

 

I guess the problem of your formula hides in the following fact:

SELECTEDVALUE ( <multiple values selected> ) = (BLANK)

 

There is an easy way to return the value you need if the choice is limited just to "Retail" and "Institutions" (or "National" and "International" ) by using the variable Part2 below, and the hard way, if you have more than just those values (see the variable Part3 below).

 

barritown_0-1701359936951.png

 

I've also attached the file so you can copy-paste some code if needed.

 

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

Syndicate_Admin
Administrator
Administrator

Problem solved:

This is the DAX

Graphic Title = "Sales"&SELECTEDVALUE(Total[Brand (CeBe)])&" in "&SELECTEDVALUE('Metrics'[Metric])&" "&
SWITCH(TRUE(),
SELECTEDVALUE(Total[Canal])="Retail","canal Retail",
SELECTEDVALUE(Total[Canal])="Institutions","Institutions Channel",
SELECTEDVALUE(Total[Canal])="","",
"Retail and Institutions")
&" "&SWITCH(TRUE(),
SELECTEDVALUE(Total[Country])="National","National",
SELECTEDVALUE(Total[Country])="International","International",
"")

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.