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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

3 REPLIES 3
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. 

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

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.