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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
hasnainrazaz
New Member

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,

1 ACCEPTED SOLUTION
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

vcgaomsft_1-1736300350371.png

vcgaomsft_0-1736300300310.png

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

View solution in original post

3 REPLIES 3
hasnainrazaz
New Member

Hi @Ritaf1983 ,

Please refer to the images below: 

hasnainrazaz_0-1736239828634.png

 

hasnainrazaz_1-1736239877092.png


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
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

vcgaomsft_1-1736300350371.png

vcgaomsft_0-1736300300310.png

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

Ritaf1983
Super User
Super User

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.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.