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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
auzzieb
Frequent Visitor

Change tooltip message based on measure being hovered over in a matrix

Hi, I am trying to get my tooltip value to display a custom value for each unique measure in the "Values" field in my Matrix visual. 

For example, I have the below fields in my visual. When I hover over a value in my matrix, I want a custom message to pop up based on the measure I have hovered over. 

 

Example: When I hover over a value associated with the "Calendar Month Settlement" measure below I want it to show "1" and if I hover over a value associated with the "WTI CMA" measure in the matrix I want it to show "2" etc. So I want my custom message to show up based on the measure I am hovering over. Is there a way I can write this in DAX? 

 

auzzieb_0-1705091966693.png

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @auzzieb ,

 

According to your description, here are my steps you can follow as a solution.

(1) Creates a new table containing the names of the measures.

 

Table (2) = DATATABLE ( 
    "Name", STRING, 
    {
        { "WTI" },
        { "WTI CMA" }
    }
) 

 

(2) We can create a measure. 

 

Measure 2 = SWITCH(TRUE(),
SELECTEDVALUE('Table (2)'[NAME])="WTI",[WTI],
SELECTEDVALUE('Table (2)'[NAME])="WTI CMA",[WTI CMA])
Measure = SWITCH(TRUE(),
SELECTEDVALUE('Table (2)'[NAME])="WTI",1,
SELECTEDVALUE('Table (2)'[NAME])="WTI CMA",2)

 

(3) Tooltip Page:

vtangjiemsft_0-1705304518920.png

 

Then the result is as follows.

vtangjiemsft_4-1705304870738.png

vtangjiemsft_1-1705304546182.pngvtangjiemsft_2-1705304561939.png

 

Best Regards,

Neeko Tang

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

4 REPLIES 4
v-tangjie-msft
Community Support
Community Support

Hi @auzzieb ,

 

According to your description, here are my steps you can follow as a solution.

(1) Creates a new table containing the names of the measures.

 

Table (2) = DATATABLE ( 
    "Name", STRING, 
    {
        { "WTI" },
        { "WTI CMA" }
    }
) 

 

(2) We can create a measure. 

 

Measure 2 = SWITCH(TRUE(),
SELECTEDVALUE('Table (2)'[NAME])="WTI",[WTI],
SELECTEDVALUE('Table (2)'[NAME])="WTI CMA",[WTI CMA])
Measure = SWITCH(TRUE(),
SELECTEDVALUE('Table (2)'[NAME])="WTI",1,
SELECTEDVALUE('Table (2)'[NAME])="WTI CMA",2)

 

(3) Tooltip Page:

vtangjiemsft_0-1705304518920.png

 

Then the result is as follows.

vtangjiemsft_4-1705304870738.png

vtangjiemsft_1-1705304546182.pngvtangjiemsft_2-1705304561939.png

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

This is awesome, I was looking for this for ages, no one could find a solution, even GPT o1 preview failed. Thanks so much!!

amitchandak
Super User
Super User

@auzzieb , You can try tooltip page with Textbox and use measure in text box

Power BI tooltip page: https://youtu.be/cN8AO3_vmlY?t=36240&list=PLPaNVDMhUXGYU97pdqwoaociLdwyDRn39&index=1

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I appreciate the suggestion and have seen this video. However, I don't believe it shows my particular case. Could you show an example of some dax that would allow my tooltip to show a "1" for example if I'm hovering over a certain measure and a "2" for example if I'm hovering over a different measure. I want to reference the measure name in my Dax and systematically tell it display a "1" when hovering over a cell in my matrix associated with my "WTI CMA" measure in the above example. 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors