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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors