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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
StephenF
Responsive Resident
Responsive Resident

Dynamic values in text field - getting from drop down

Im getting values for a dynamic text field from a SLICER dropdown.

 

Im able to get  the text "ALL" and individual single item names but not a list when multiple items are selected - "All" is returned.

 

Is there a way to rewrite my function here from

 

Selected Media = SELECTEDVALUE('DataLake'[Media],"All Media")
 
In such as a way as this
 
if selected media is multiple items return a list else if a single item return that item only else return "all".
 
 
 
 
 

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@StephenF , Based on what I got

 

if(isfiltered('DataLake'[Media]) , concatenatex('DataLake', 'DataLake'[Media], ", ") ,"All Media" )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

That sort of works but it outputs thousands of values. I need it to rollup the values. There is only 5 different distinct values in my dropdown.

 

I think it needs to work with DISTINCT but i can't get the syntax right, any idea?.

 
Edit: working code is :
 
Selected Media plus = if(isfiltered('DataLake'[Media]) , calculate(concatenatex(VALUES('DataLake'[Media]), 'DataLake'[Media], ", " ,"All Media" )))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@StephenF , Based on what I got

 

if(isfiltered('DataLake'[Media]) , concatenatex('DataLake', 'DataLake'[Media], ", ") ,"All Media" )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That sort of works but it outputs thousands of values. I need it to rollup the values. There is only 5 different distinct values in my dropdown.

 

I think it needs to work with DISTINCT but i can't get the syntax right, any idea?.

 
Edit: working code is :
 
Selected Media plus = if(isfiltered('DataLake'[Media]) , calculate(concatenatex(VALUES('DataLake'[Media]), 'DataLake'[Media], ", " ,"All Media" )))

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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