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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
pirdim
Advocate I
Advocate I

Dynamic titles don't work in slicer if title measure depends on value selected in slicer

Hi all,
I have a weird issue - dynamic titles don't work for slicers if title measure depends on this exact slicer value. In order to show the issue I created the most simple pbix file which has only 1 table with 1 column "Number" with 3 values: 1,2,3. And a simple measure:
Title = if ( Selectedvalue (Table[Number]) = 1, "One is selected", "Smth else is selected").

This "Title" works fine if added to card as value and even if added as dynamic title to card. But it doesn't work as dynamic title for Slicer in which I am changing [Number] value. Below gif to show the issue.
And .pbix file can be found here: Test .pbix file


Wtf??!

 

ezgif.com-gif-maker small.gif

7 REPLIES 7
Jeanxyz
Post Prodigy
Post Prodigy

 

I had a similar issue. It's fixed after adjusting measure format to text. 

How is the deatiled discussion. https://community.powerbi.com/t5/Desktop/Dynamic-Visual-Title-Cannot-Select-Measure/td-p/1089380

Yes formating to text works for me too - some examples:

For 3 digit number

Measure1 = FORMAT(CALCULATE(DIVIDE([My_Measure],COUNT('Date'[Date])),'Date'[Week Type]="Week2"),"000")
 
For 2 decimals:
Measure2 = FORMAT(CALCULATE([Measure5],'Date'[Week Type]="Week3"),"00.00")
 
For Variance:
Measure3 =   FORMAT([Hours LOST -1week]-[Hours LOST -2nd week],"▲0.00;▼-0.00")
v-yangliu-msft
Community Support
Community Support

Hi  @pirdim ,

Here are the steps you can follow:

1. Create measure.

Flag =
IF(
ISINSCOPE('Table'[Number]),"no",FORMAT( SELECTEDVALUE('Table'[Number]),0))

2. Click on Card Graphics – Format – Title – Title text – fx.

vyangliumsft_0-1652780130278.png

3. Enter the Title text – Title interface. Select [Flag].

vyangliumsft_1-1652780130280.png

4. Result:

vyangliumsft_2-1652780130281.png

 

Best Regards,

Liu Yang

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

hi @v-yangliu-msft ,

Thanks for reply but I'm afraid you are answering not the questing I asked. In your example you create a measure which will show number in CARD measure depending on filter. But I never specified I had an issue with card visual title, neither that I need to see a number as title. @Arul previously pointed on post where similar issue was discussed and apparently you simply cannot add dynamic for source visual. In my case - I wanted title of SLICER to be changed depending on selected items in this very slicer.

Arul
Super User
Super User

@pirdim ,

You can do it for other target filter visuals but not on source filter visuals.

You can refer this community thread for more clarification on this as this is an issue reported by some other users as well.

https://community.powerbi.com/t5/Issues/Field-Conditional-formatting-is-not-working-in-slicer/idi-p/... 

 

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


hi @Arul . thanks for reply. Unfortunately I didn't find this thread when I was doing my research so I decided to make a separate post. Probably because I was specifically looking for "title" issue but thread's issue is very similar indeed. I am really surprised it's not working for source filter visuals. 

Same problem here.

On the same slicer, i'd like to display the title :

- "Please select a year" with a red background if nothing is selected from that slicer

- "Year selected :" with no background colour if a year has been selected

 

I've tried SELECTEDVALUE and HASONEFILTER.

 

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors