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
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
Europe Fabric Conference

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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