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 September 15. Request your voucher.

Reply
soliverc
Frequent Visitor

Dynamic DAX title not updating with selected value.

I want the title of a slicer to change depending on if something is selected or not. 

 

For example, a slicer with a vertical list of countries. 

 

If there is not country selected, the Slicer title is just: "Country"

If there is a country selected, the Slicer title changes to "Country*" with an asterisk.

 

I have put this piece of code into the Slicer title field (using the fx button).

 

_countrySlicerTitle = 
VAR SelectedCountry = SELECTEDVALUE(data[Country])
RETURN
    IF(ISBLANK(SelectedCountry), "Country", "Country *")

 

However, when I select a country in the slicer, nothing happens to the title. It stays on "Country".

 

If I put the Dax title into a separate card, it updates when something is selected. 

 

What am I doing wrong? Or is this a bug?

 

soliverc_0-1712250630840.png

 

3 REPLIES 3
Anonymous
Not applicable

Hi @amitchandak ,thanks for the quick reply, I'll add further.

Hi @soliverc ,

Regarding your question, I conducted a test and found it to be unattainable.Because in the chart title conditional formatting, the 'SELECTEDVALUE' can only return when it's been filtered but not been highlighted.I created a second slicer for the title to take effect.

vzhouwenmsft_0-1712567343267.png

You may be able to achieve your needs indirectly by combining card visualization objects.

Measure = IF(ISFILTERED('Table'[Country]) = FALSE(),"Country","Country*")

vzhouwenmsft_1-1712567597998.png

 


Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@soliverc , seems like you are creating a calculated column. A calculated column can not use selected values. Only measure can use

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

It's a measure. I clicked "New Measure" not "New Column"

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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