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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
cristianpark
Frequent Visitor

Custom Tooltip on Matrix Based on Measure

Hi guys

 

I'm trying to do something somehow easy but it seems like is not possible in Power BI (Jan 2020 release). I'm trying to display a help message (on a tooltip) based on column the user is hovering into.

 

Matrix.png

There are two different measures (Fixed and Available) and a dimension (Type) used in order to achieve this

 

Properties.png

I want to display text when user hovers on a cell (column based):

  • When hovering on Fixed values: Fixed values are for vehicles that entered reparation during last month and got fixed already.
  • When hovering on Available: Available % indicates proportion of vehicles ready to sell for each type.

I'm trying with this DAX expression in order to determine whether I'm in Fixed or Available column

 

Tooltip Text =
VAR selectedType=SELECTEDVALUE(Types[Label], BLANK())
VAR selectedMeasure=SELECTEDMEASURENAME()
RETURN
IF(selectedType<>BLANK(),selectedType, "Nothing")&" Measure: "&selectedMeasure

 

But I get error "There is no measure reference in the current context that can be used by SELECTEDMEASURENAME", I read about calculation groups and is not what I'm trying to do here but have no other clue on how to achieve this.

 

Could you please give me an idea on how to create such a tooltip?

Thanks

 

 

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

Hi , @cristianpark 

Try steps as below:

1.create a table contain a column as below

53.png

2. Then create measures "value" (to instead the field "fixed" and "available") ,and put it into the value of matrix 

 

 

Value = SWITCH(SELECTEDVALUE('Column'[Column]),"Fixed",AVERAGE('Table'[Fixed]),"Available",AVERAGE('Table'[Available]))

 

 

3.create page3 as  tooltips page ( make sure the type of tooltip is report page)

Put  measure "tooltip text" into a card visual in page3

 

 

Tooltip Text = 
VAR selectedType=SELECTEDVALUE('Column'[Column], BLANK())
RETURN
IF(selectedType<>BLANK(),selectedType, "Nothing")&" Measure: "&[Value]

 

 

52.png

4. it will show as below

54.png

 

Here is a demo .

pbix attached

 

 

In addition , you can refer this post if help.

https://community.powerbi.com/t5/Desktop/Can-I-have-a-tooltip-per-entry-to-a-table/td-p/928605

Best Regards,
Community Support Team _ Eason
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-easonf-msft
Community Support
Community Support

Hi , @cristianpark 

Try steps as below:

1.create a table contain a column as below

53.png

2. Then create measures "value" (to instead the field "fixed" and "available") ,and put it into the value of matrix 

 

 

Value = SWITCH(SELECTEDVALUE('Column'[Column]),"Fixed",AVERAGE('Table'[Fixed]),"Available",AVERAGE('Table'[Available]))

 

 

3.create page3 as  tooltips page ( make sure the type of tooltip is report page)

Put  measure "tooltip text" into a card visual in page3

 

 

Tooltip Text = 
VAR selectedType=SELECTEDVALUE('Column'[Column], BLANK())
RETURN
IF(selectedType<>BLANK(),selectedType, "Nothing")&" Measure: "&[Value]

 

 

52.png

4. it will show as below

54.png

 

Here is a demo .

pbix attached

 

 

In addition , you can refer this post if help.

https://community.powerbi.com/t5/Desktop/Can-I-have-a-tooltip-per-entry-to-a-table/td-p/928605

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi there,


By chance you still have the .pbix file? seems to be gone

Thank you @Greg_Deckler and v-easonf-msft for such complete answers.

 

Bookmarks approach @Greg_Deckler proposed is an easy way to do it without affecting underlying data model (the default option for us was just to put help text below table so bookmarks are a good addition to it).

 

Creation of table as v-easonf-msft is cool, that way you can customize tooltip as needed and is more scalable modifying value measure for adding columns with custom tooltip. The only caveat I saw is that you'll loose ability of sorting by each column on matrix and in my case, that's a must.

 

It'll be great to be able to somehow identify a measure within a cell but workarounds are good enough for now.

 

Thank you!

Greg_Deckler
Super User
Super User

Well here is one way that I recently came up with (attached). I'll see if I can come up with anything better. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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