Forum Discussion
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-chart-and-line/m-p/2234680#M814637
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.
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.
to achive the right result, i made a column index, then i refered a measure to that index.
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.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.
10 Replies
- IrwanSuper 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.
- lkaneffHelper I
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.
- IrwanSuper User
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.
to achive the right result, i made a column index, then i refered a measure to that index.
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.