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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Oodi
Frequent Visitor

Using Measure Name as Dynamic Title

Hello,

I'm creating a dynamic tooltip which displays dynamic title based on selection in a given time visual.

The tooltip should display the selected measure title

for column names below works fine

Title =
IF(ISFILTERED(Tickets[Topic], Tickets[Topic] = SELECTEDVALUE(Tickets[Topic])

 but what ways are there to display measure titles in such way?

I have tried  

Measure Title =
IF(HASONEVALUE('MeasuresTable'[Measures]),
VALUES('MeasuresTable'[Measures]),
" ")

but this requires at least one measure to be filtered in order to work. Other way just shows blank.

Is there any alternatives?

5 REPLIES 5
Oodi
Frequent Visitor

Keeping the topic open if anyone has insights:

To recap trying to display measure name in a dynamic title with custom report page tooltip in a same way Power Bi displays measure names in a default tooltip but only displaying one measure title (the one that you are hovering on) at a time instead of all like in the below examples.

Example with Measures in Values.
Measure Title.png
Example with Parameters in Values:
Parameter Title.png

Tickets = {
    ("Tickets", NAMEOF('DimMeasures'[Tickets]), 0),
    ("Cancelled Tickets", NAMEOF('DimMeasures'[Cancelled Tickets]), 1),
    ("Delayed Tickets", NAMEOF('DimMeasures'[Delayed Tickets]), 2),
    ("On time Tickets", NAMEOF('DimMeasures'[On time Tickets]), 3)
}

 

Oodi
Frequent Visitor

@lbendlin, @xifeng_L 
Xifeng your solution works in Matrix. When tying to apply it in a line chart with multiple measures in y-axis and Date in x-axis the same continues. When filtering one measure (one line) it works but when all lines are visible it doesn't. 
Also tried below but same result.

 

VAR _Selected =
IF(SELECTEDMEASURENAME() = "Tickets", SELECTEDMEASURE(),
BLANK())

VAR _Selected2 =
IF(SELECTEDMEASURENAME() = "Tickets", "Tickets",
BLANK())

 



Any ideas how to make it work with field parameters? Tried below:

 

Tickets = {
    ("Tickets", NAMEOF('DimMeasures'[Tickets]), 0),
    ("Tickets Cancelled", NAMEOF('DimMeasures'[Tickets cancelled]), 1),
    ("Tickets not on time", NAMEOF('DimMeasures'[Tickets not on time]), 2),
    ("Tickets on time", NAMEOF('DimMeasures'[Tickets on time]), 3)
}

 

However when choosing it with 

 

SELECTEDVALUE(Tickets[Parameter])

 

 Power BI gives the error:

 

Couldn't load the data for this visual
MdxScript(Model) (303, 1) Calculation error in measure 'DimMeasures'[Measure Title_]: Column [Parameter] is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression.

 

 

that is to be expected.  All of the "SELECTED"  functions only work if there is exactly a single value present.

xifeng_L
Super User
Super User

Hi @Oodi ,

 

You can refer to below demo.

 

Demo - Using Measure Name as Dynamic Title.pbix

 

xifeng_L_0-1716627029008.png

 

xifeng_L_1-1716627035000.png

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.