Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Tooltip Customization for Highlighted Bars in Power BI Charts

Hello everyone, I have a question about tooltips. I've changed the "edit interactions" of a bar chart to "Highlight," so when I select, the bar chart will be divided into two parts, with the tooltip automatically having "Highlighted." My question is, is there a way to show one type of tooltip when hovering over the unhighlighted part and another type of tooltip when hovering over the highlighted part? For example, showing different values in the tooltip. I thought about custom tooltips, but I don't know how to get the hover event. Thank you for reading.

 

  • Anonymous 

     

    if i understand correctly,  you want change the tooltip on the visual , base on your selection from your table visual. 

     

    if this is the case, im afraid there is no way to achieve this ( as far as i know ).

     

     

4 Replies

  • Daniel29195's avatar
    Daniel29195
    Icon for Community Champion rankCommunity Champion

    Anonymous 

    i think, you can achieve this doing the following : 

    remove the legend.

     

    now let us say you have 2 values in your legend. ( sick hours, working hours )  

     

    so you need to create 2 measures , base on the values of the legend .

     

    so

    measure 1=  calculate ( sum( ... ) , table_name[col_name] = "sick hours" ) 

    measure 2=  calculate ( sum( ... ) , table_name[col_name] = "working hours" ) 

     

    now add these 2 measure to the visual.

     

    now create w custom tooltips. 

    now the trick here,  that when you create the tooltip page,  for tooltip 1, drag and drop the first measure on the "show tooltip on"  section .

     

     

    let me know if this workaround helps you out. 

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      I'm apologize that my above image confused you.
      In my case, I don't have the legend. A matrix will interact with the bar chart.

       

      • Daniel29195's avatar
        Daniel29195
        Icon for Community Champion rankCommunity Champion

        Anonymous 

         

        if i understand correctly,  you want change the tooltip on the visual , base on your selection from your table visual. 

         

        if this is the case, im afraid there is no way to achieve this ( as far as i know ).