Forum Discussion

hasnainrazaz's avatar
hasnainrazaz
New Member
1 year ago
Solved

Tooltip Customization (Stacked & Column Chart)

Hello, 

I have a clustered column chart that displays the number of employees against different employment tenure brackets. I have a legend on the same graph to show the bifurcation against departments. 

I have another column chart that I want to use as a tooltip. How do I ensure that when I hover over my stacked chart the tooltip column chart uses the same color as that of the legend to display the bars on the tooltip column chart? 

For e.g. if the color is blue of the area I hover over to display the tooltip then all the bars are blue and so on...

Regards,

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi hasnainrazaz ,

     

    Try getting the current legend, then returning the corresponding color based on the legend and applying it to the conditional format of tooltip's column chart.

    Measure = 
    VAR __product= SELECTEDVALUE('financials'[Product])
    VAR __color =
    SWITCH(
        __product,
        "Amarilla","#845ec2",
        "Carretera","#d65db1",
        "Montana","#ff6f91",
        "Paseo","#ff9671",
        "Velo","#ffc75f",
        "VTT","#f9f871"
    )
    RETURN
        __color

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

3 Replies

  • Hi hasnainrazaz 

    In general, you can "lock" the colors of the graph on the tooltips using conditional formatting and DAX.
    To be 100% sure this is your scenario, it’s necessary to see what you are doing.
    Therefore please 

    can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

  • Hi Ritaf1983 ,

    Please refer to the images below: 

     


    In the second image; the tooltip bar charts ideally should be the color (orange) which is the color of the segment I hovered over to view the tooltip visual. 

    Regards,

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi hasnainrazaz ,

       

      Try getting the current legend, then returning the corresponding color based on the legend and applying it to the conditional format of tooltip's column chart.

      Measure = 
      VAR __product= SELECTEDVALUE('financials'[Product])
      VAR __color =
      SWITCH(
          __product,
          "Amarilla","#845ec2",
          "Carretera","#d65db1",
          "Montana","#ff6f91",
          "Paseo","#ff9671",
          "Velo","#ffc75f",
          "VTT","#f9f871"
      )
      RETURN
          __color

      Best Regards,
      Gao

      Community Support Team

       

      If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
      If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

      How to get your questions answered quickly --  How to provide sample data in the Power BI Forum