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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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










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


Proud to be a Super User!









"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

8 REPLIES 8
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 III
Advocate III

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 II
Advocate II

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.










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


Proud to be a Super User!









"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









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


Proud to be a Super User!









"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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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