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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Dynamic Text using multiple slicers

Hi,

 

I'm trying to set up a card visualization as a page header to display what is selected in each slicer. My current measure is giving me what I want, but only when I have items selected in the slicers. In the example below, if I remove the Dept Name "AMC BIRTH CTR", then every Dept Name is displayed on the page header. I want no Dept Name to display if nothing is checked in that slicer. Here is my current measure:

 

Title Measure 2 = "OPERATIONS DATA - " &  CONCATENATEX(VALUES(DateDim[Fiscal Year]),DateDim[Fiscal Year]," & ") & ", "
    & CONCATENATEX(VALUES(DateDim[Month Name]), DateDim[Month Name]," & ") & ", "
    & CONCATENATEX(VALUES(EncounterDetail[Patient Class]),EncounterDetail[Patient Class], " & ") & ", "
    & CONCATENATEX(VALUES(EncounterDetail[DC Dept Name]),EncounterDetail[DC Dept Name]," & ") & ", "
    & CONCATENATEX(VALUES(EncounterDetail[DC Service]),EncounterDetail[DC Service], " & ")

 

I'm sure I'm using the wrong function but I don't know what to use instead. If nothing is selected in any slicer, then the header should only read "OPERATIONS DATA". As you select items in the slicers, those items will appear to the right of the original header. Below is the report so you have a better understanding of what I'm talking about. Look at the slicer section on the right side and the page header up top. 

dynamic text power bi forum_2.jpg

 

 

 Thank you!

 

 

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

You need to do some IF(HASONEVALUE(...)) type stuff. I would do those in VAR statements and then concatenate together.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks, Greg. The problem with using IF(HASONEVALUE...) is you're allowed to check more than one box in each slicer. If you check two months in the Month slicer, then it disappears from the text. Do you have any other ideas? Thank you!!

Anonymous
Not applicable

Does anyone else have an idea of how to write this measure? I'm stumped. Please and thank you!!

Try ISFILTERED instead.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

So I tried this but it only gives me my first row, Fiscal Year.  The other slicers do not display.

 

Title Measure = "OPERATIONS DATA " & IF(ISFILTERED(DateDim[Fiscal Year]),CONCATENATEX(VALUES(DateDim[Fiscal Year]),DateDim[Fiscal Year]," & ") & ", "
    & IF(ISFILTERED(DateDim[Month Name]),CONCATENATEX(VALUES(DateDim[Month Name]), DateDim[Month Name]," & ") & ", "
    & IF(ISFILTERED(EncounterDetail[Patient Class]), CONCATENATEX(VALUES(EncounterDetail[Patient Class]),EncounterDetail[Patient Class], " & ") & ", "
    & IF(ISFILTERED(EncounterDetail[DC Dept Name]), CONCATENATEX(VALUES(EncounterDetail[DC Dept Name]),EncounterDetail[DC Dept Name]," & ") & ", "
    & IF(ISFILTERED(EncounterDetail[DC Service]), CONCATENATEX(VALUES(EncounterDetail[DC Service]),EncounterDetail[DC Service], " & ")    )))))

 

 

dynamic text power bi forum_3.jpg

 

 

I'm not very fluent in DAX so maybe my syntax is incorrect. Any help is greatly appreciated. Thank you!!

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.