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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PhilippMer
Regular Visitor

Tooltip on linecharts

Hello, 

I am trying to re-do a colleagues Dashboard. I have created a line chart, with > 10 lines showing. When creating a Tool tip, everything works fine, but it showes me all Information for every line on the X-Axis, where my Mouse is hovering. 

I would like to have the tooltip filtered on the current line my mouse is hovered on. 

Any Idea how to achieve that? 

My Colleagues chart for some reason is doing that - but I cannot comprehend how he achieved that (he does not remember how it happened). 

Any Help is appreciated = )

1 ACCEPTED SOLUTION

Hi @PhilippMer ,

 

Thanks for sharing the pbix file with me.

I checked the pbix file and was not able to identify why this is not working as the tooltip and your chart looks perfectly fine.

To check further, I thought why not try replicate this tab step-by-step to see where things are going wrong.

I created a new tab, Then replicated the same line chart and set-up the tooltip on it and it seems to work:

Pragati11_1-1654855391448.png

 

Now I added the slicers one-by-one like on your original tab. I started with DATE slicer and it works:

Pragati11_2-1654855491385.png

I added the 2nd slicer for the views count and it still semms to work:

Pragati11_3-1654855556109.png

As soon as I add the slicer for Post Type, the tooltip doesn't work anymore:

Pragati11_4-1654855635957.png

One reason for this is:

Post type come from LinkedIn logs table, which has MANY-to-ONE relationship with LinkedIn Post tables from where the Post Text is coming. Basically for one Post Text value, you can have multiple Post Type values.

As soon as you select something in Post Type the tooltip gets filtered for only the selected Post Type value and shows all the Post Titles that have the selected Post Type values in the data. This makes sense to me.

So this is how why you see such behaviour on your tooltip.

 

One solution what I can suggest here is - Rather than moving Post Title to your legend section in Line chart, if you move Post Type in the legend section then this gives a better visibility on the information on the tooltip. Something like below:

Pragati11_5-1654856415440.png

Once you start selecting the post type slicer, you see that the tooltip shows all the post titles that have this post type in the tooltip:

Pragati11_6-1654856492306.png

So, based on the granularities you have in data this makes more sense to me. But this your data and you have better understanding of the usecase from business point of view on what is required here better than me.

Let me know if this works or there is a different usecase that you need to replicate here.

Apologies for coming back little late on this and such a long explanation, as I could not have explained it better than this.

 

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

17 REPLIES 17
Pragati11
Super User
Super User

Hi @PhilippMer ,

 

You can definitely achieve this by creating a custom tooltip on your report.

Something like below. Whenever I hover over a line, thr tooltip shows information only for that particular song genre like pop, rap, etc.

v1.gif

To get details on how to use custom tooltips on a Power BI report, check this article:

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-tooltips?tabs=powerbi-desktop

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Thank you 

Hello @Pragati11 

Thank you very much for your help. 
I already created a custom tooltip, should it automaticaly only show hovered values, or is that an extra setting?
In the documentation I did not find the necessary information so far. 

HI @PhilippMer ,

 

Yes custom tooltip needs to be enabled on your visual and it should filter the shown info based on you hover in your main visual.

Can you share some screenshots around what is on your visual and what is on your custom tooltip?

Custom tooltip should always include the category that is shown as a line on your Line chart. Otherwise it won't filter it accordingly.

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi  @Pragati11 ,

thank you for your fast replies! 

In the following picture is my linechart (Quite messy still) : 

PhilippMer_0-1654778126303.png

And here is my ToolTip: 

PhilippMer_1-1654778172080.png

My PowerBi is in German 😞 

I manually added my ToolTip as the one for this linechart in its settings. 
But if im not mistaken, the filters are correct? 
Thanks in advance!

HI @PhilippMer ,

 

Are you moving PostTitle column in your custom tooltip which is represented as a line in your line chart?

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi @Pragati11 

I believe I do, not quite sure what you mean to be honest.
I attached another Screenshot.

So my Data Table in this Tooltip consists of the PostTitle column and the Views

PhilippMer_0-1654778645738.png

Is this what you mean by "moving"? 

HI @PhilippMer ,

 

Yes this what I meant by moving. This seems right and also you have moved postTitle column as a LEGEND on your line chart.

This should work technically as that's what I have done.

Are you moving the right Tooltip on your line chart?

I see in your earlier screenshot that you have used Post QuickInfo as a tooltip on your line chart. This is the right tooltip that you re referring above right?

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi @Pragati11 ,

yes this is the ToolTip I am using on my Line Chart. I attached another Screenshot, just to make sure 🙂 

"Berichtseite" means "Report page". 

PhilippMer_0-1654779268198.png

Hopefully you can spot, whatever I did wrong here...

Thank you! 

HI @PhilippMer ,

 

This seems to be right.

Can you tell me another thing. On your line chart what granularity of date is moved in the x-axis?

You tooltip seems to show a particular day's views.

Can you check if the Date on line chart x-axis is at the day granularity:

Pragati11_0-1654779504775.png

If that's already the case, then can you share your pbix file with me by removing any sensitive data from it? You can share it via dropbox or WeTransfer.

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi @Pragati11 

thank you for all your effort! 

My LineChart was set to the correct format...

I would then proceed to send it to you via DropBox.

Thank you so much for your time! 

@Pragati11 

WeTransfer, would be better. Thank you

Hi @PhilippMer ,

 

Thanks for sharing the pbix file with me.

I checked the pbix file and was not able to identify why this is not working as the tooltip and your chart looks perfectly fine.

To check further, I thought why not try replicate this tab step-by-step to see where things are going wrong.

I created a new tab, Then replicated the same line chart and set-up the tooltip on it and it seems to work:

Pragati11_1-1654855391448.png

 

Now I added the slicers one-by-one like on your original tab. I started with DATE slicer and it works:

Pragati11_2-1654855491385.png

I added the 2nd slicer for the views count and it still semms to work:

Pragati11_3-1654855556109.png

As soon as I add the slicer for Post Type, the tooltip doesn't work anymore:

Pragati11_4-1654855635957.png

One reason for this is:

Post type come from LinkedIn logs table, which has MANY-to-ONE relationship with LinkedIn Post tables from where the Post Text is coming. Basically for one Post Text value, you can have multiple Post Type values.

As soon as you select something in Post Type the tooltip gets filtered for only the selected Post Type value and shows all the Post Titles that have the selected Post Type values in the data. This makes sense to me.

So this is how why you see such behaviour on your tooltip.

 

One solution what I can suggest here is - Rather than moving Post Title to your legend section in Line chart, if you move Post Type in the legend section then this gives a better visibility on the information on the tooltip. Something like below:

Pragati11_5-1654856415440.png

Once you start selecting the post type slicer, you see that the tooltip shows all the post titles that have this post type in the tooltip:

Pragati11_6-1654856492306.png

So, based on the granularities you have in data this makes more sense to me. But this your data and you have better understanding of the usecase from business point of view on what is required here better than me.

Let me know if this works or there is a different usecase that you need to replicate here.

Apologies for coming back little late on this and such a long explanation, as I could not have explained it better than this.

 

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hello @Pragati11 
Could you privde your pbix file with your solution?
I'm traying to do the same as @PhilippMer: line chart and custom tooltip. I had column in line chart to be Legend and it is not filtering data in custom tooltip when I hoover over one of lines in line chart.

Documentations says it can't be done: https://community.fabric.microsoft.com/t5/Desktop/Tooltip-on-linecharts/td-p/2569001

I'm wondering how you managed to work it.

Hello @Pragati11 ,

thank you so much for your time and effort. I couldnt get my head around this porblem. 

This solution helped me out alot! 

 

HI @PhilippMer ,

 

I am glad the explanation helped.

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

HI @PhilippMer ,

 

Yes share the pbix with me. I will see what is happening there.

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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