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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Change the measure in a tooltip based on the chart's label

Hi, everyone. I'm trying to make a bar chart comparing the total values for two different time periods. The bars are divided based on the product categorie and so far everything is working fine except the fact I don't know how to change the values on the tooltip I made to show the main top 3 products with most losses for each time period. I've created two different measures which calculate the value of Total Sales for two different periods of time defined by the user on the data slicer: Perda Total A and Perda Total B and now I want to show their products with highest values based where the mouse is pointed. Example: If I point my mouse button to the blue bar who has DERMO as its categorie, my tooltip will show the products with most losses in the Period of time A who are categorized as DERMO products, if I scroll down a little and point the button to the red bar in the same category, my tooltip will show the products with most losses in the Period of time B who are categorized as DERMO products. 

harrisoares_0-1650654035500.png

In short term, is there a DAX Formula which allows me to change the value of one measure based on bars comparing values in different periods of time just by pointing my mouse button on it?

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Are you using two measures instead of using legend in the bar chart?

If so, I'm afraid it's not supported for dax to return different value based on measure/column name.

 

Best Regards,

Jay

serpiva64
Solution Sage
Solution Sage

Hi,

It seems to function

serpiva64_0-1650705197959.png

As you see when i hover over store key 199, in the tooltip i see only Store 199

To achieve this, in your tooltip page, 

serpiva64_1-1650705413143.png

you have to insert Store Key (in your case Period) in Drag tooltip fields here

serpiva64_3-1650705534552.png

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.