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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
lkaneff
Helper I
Helper I

Custom tooltips in Line Chart Visuals Legend Issue

My problem is similiar to this one: https://community.fabric.microsoft.com/t5/Desktop/Issues-on-customizing-tooltips-in-an-stacked-area-...
This location should be United States.  Has this issue been resolved.  Why can't it see the location for the line I'm hovering over.  Please provide me a solution to this.  I can't seem to find one.  

Adventure works tooltip problem.png

2 ACCEPTED SOLUTIONS

hello @lkaneff 

 

perhaps the mismatch result comes from not accurate measure?

 

here is a simple example of my dummy data.

When i create a measure for getting the value of ID, it will get wrong result.

Irwan_0-1772328967385.png

to achive the right result, i made a column index, then i refered a measure to that index.

Irwan_1-1772329080177.png

 

the important is you can not create a measure to get a value that is not a number so you need to repointing a number into that string value.

i am not sure if i explained correctly but hope you get the idea.

 

Hope this will help.
Thank you.

View solution in original post

hello @lkaneff 

 

that is depend on how your data is.

 

i did with indexing the column based on value for all data/rows. after indexing, i calculate which index has the max value on each date. then i calculate what country based on the return index.

 

but surely you can do with if statement to do this. in my experience, you can not rely on DAX to return a string value directly so you need a unique value for what you want to get then return that value into the string value.

 

take a note as mentioned by @danextian , by default line chart will calculate across all lines.

 

Hope you get the idea.


Thank you.

View solution in original post

10 REPLIES 10
danextian
Super User
Super User

Hi @lkaneff 

Tooltips in a line chart aren’t evaluated per line or the line you're trying to hover — they’re evaluated across all lines. Since Australia comes first alphabetically, that’s what gets shown.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Irwan
Super User
Super User

hello @lkaneff 

 

did you use the custom tooltips suggested in the link?

 

i am not sure about custom visual tooltip but power bi custom tooltip depend on the calculation.

try checking this link

Create report tooltip pages in Power BI - Power BI | Microsoft Learn

 

Thank you.

Yes. I've even tried measures.  It doesn't work.  My custom tooltip works fine in other chart types but if I do a line chart or area chart my locations do not change.  

hello @lkaneff 

 

perhaps the mismatch result comes from not accurate measure?

 

here is a simple example of my dummy data.

When i create a measure for getting the value of ID, it will get wrong result.

Irwan_0-1772328967385.png

to achive the right result, i made a column index, then i refered a measure to that index.

Irwan_1-1772329080177.png

 

the important is you can not create a measure to get a value that is not a number so you need to repointing a number into that string value.

i am not sure if i explained correctly but hope you get the idea.

 

Hope this will help.
Thank you.

Would you mind showing me the measure you used to get that to work.  I'm a bit of a beginner.  That is exactly what I want.  I assume you did an if statement and then a text output.  Am I on the right track? I can try it myself and if I can't figure it out I'll post again.  Thanks for your help!

hello @lkaneff 

 

that is depend on how your data is.

 

i did with indexing the column based on value for all data/rows. after indexing, i calculate which index has the max value on each date. then i calculate what country based on the return index.

 

but surely you can do with if statement to do this. in my experience, you can not rely on DAX to return a string value directly so you need a unique value for what you want to get then return that value into the string value.

 

take a note as mentioned by @danextian , by default line chart will calculate across all lines.

 

Hope you get the idea.


Thank you.

Sorry to bother you again but would you mind showing me what you had in your field well?

hello @lkaneff 

 

please share your sample data that represent original data.

my field might be not work in your case, so it is better to work out with your data.

Thank you.

Excellent. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.