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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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