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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
danextian
Super User
Super User

Cannot select a measure as a visual title

Hello,

 

I don't know what I am missing. I can't select a measure as a dynamic title of a visual. The measures are in the dropdown but can' be selected.  dynamic visual title.png





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
1 ACCEPTED SOLUTION

@danextian 

 

You may try adding CONVERT.

https://community.powerbi.com/t5/Desktop/expression-that-yield-variant-data-type-cannot-be-used-to-d...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Bapollon
New Member

There is a simple solution

 

Create another measure like, 

 

"Chart Title = "Your Text " & [Your Measure]"

 

and link it to the other measure you created before, it automatically selects text formats and can be set for conditional formatting.

chahineatallah
Helper III
Helper III

I am having the same issue, am not able to select my measure to be used as title

my measure gives a text ,tried also the convert but still no chance to work

 

Title = var st= IF(HASONEVALUE('date'[Year]),
IF(HASONEVALUE('date'[Month Name]),
"",
AVERAGEX(VALUES('date'[Month Name]),
"Average workouts per month")))
return
CONVERT(st,STRING)
molegris
Advocate IV
Advocate IV

Hi,

Just for those who are still struggling despite the advise to use CONVERT.  You might have done the same mistake I did.  CONVERT is not going to work alone... you need to change the type on the settings of the measure.  duh!  can't beleive I missed it!

Actually, after changing the type in the settings part, I didn't even need to use the CONVERT function.

Capture d’écran 2021-02-10 152411.png

 

regards,

--mo

jochenj
Advocate III
Advocate III

i have the same issue: measure is visible but not selectable in the dialog of Title Expression 

Tried with simplest possible measure without success:
lblX = "My Custom Title"

 

The only thing i can choose in this "Title Text" dialog are COLUMNS but not MEASURES 

Any hints? 

Thanks,

 

Gordonlilj
Solution Sage
Solution Sage

Hi,

 

What is the datatype for the measure?

I belive measures used for titles must must be a string datatype for it to work

The measure is a string that shows a range of dates with this format: dd/mm/yy - dd/mm/yy.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Could you post the entire measure?

I'm posting a different measure since the period range measure is dependent on othe pretty long measures. This one is pretty simple but still I can't select this as a visual title.

P&L Overview text =
VAR __RANGE =
    SELECTEDVALUE ( 'Actual vs Benchmark Measures'[Range] )
VAR __BENCHMARK =
    SELECTEDVALUE ( 'Actual vs Benchmark Measures'[Benchmark] )
RETURN
    "P&L Overview " & __RANGE & " " & __BENCHMARK




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

@danextian 

 

You may try adding CONVERT.

https://community.powerbi.com/t5/Desktop/expression-that-yield-variant-data-type-cannot-be-used-to-d...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.