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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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










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

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 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.