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
AdamBCBSNE
Frequent Visitor

DAX for a tooltip visual

Hello,

I have a horizontal bar chart displaying the number of story points completed by area.

I want to create a tooltip that includes a pie chart allowing the user to get a visual representation of the percentage of items that are in the area hovered for the tooltip.

So, if there are 5,000 items in the "Operations" area out of 20,000 total items and the user hovers over the "Operations" bar they will get a tooltip that includes a pie chart with a 25% slice for "Operations" and the remainder of the pie filled in a different color.

Hoping this makes sense. If anyone has an idea I would love to hear back.

Thanks!
Adam

1 ACCEPTED SOLUTION

I got this one figured out!

I created these 3 measures:

 

Total = CALCULATE( SUM ( 'Sheet1'[StoryPoints] ) , ALL ( 'Sheet1'[AreaLevel] ) )
Selected = CALCULATE(SUM ( 'Sheet1'[StoryPoints] ) , ALLSELECTED ( 'Sheet1'[AreaLevel] ) )
NotSelected = CALCULATE( [Total] - [Selected] )
 
Then, I put the Selected and NotSelected measures in the pie chart Values. Voila! I still have a little formatting to do, but this is working great!
2019-12-19_13-27-38.png

View solution in original post

5 REPLIES 5
TomMartens
Super User
Super User

Hey @AdamBCBSNE ,

 

I'm wonderin if you are talking about something like this, I know you were asking about DAX, just to make sure that I understand "the output" you are looking for:

image.png

If so, pleae provide some sample data that allows to create the DAX.

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hey @TomMartens , that's so close to what I was thinking. I was thinking DAX would be needed because in my perfect world the pie would show the percentage of, say "Computers" from your screenshot as dark blue and then, the rest of the pie would be grey for all others. The reason for wanting that is because the user is only interested in seeing how much of the total is "Computers" (again, just from your example) versus all other categories. It wouldn't be necessary to see all the slices of all the categories. I also think DAX would be helpful for a title on the tooltip to display the category being hovered over.

 

I have an Excel file with a small set of aggregated data. Can I send that to you? I don't see an option to add an attachment here so I'm including screenshots of the data and two charts. One horizontal bar chart for the Main Chart and a Tooltip Chart for what I'm thinking about. The Tooltip Chart is what you would see if you hovered over "Operations" from the Main chart.

 

data.pngmain.pngtooltip.png

 

Thanks for any guidance here!
Adam

Hello, just wanted to bump this one. Anyone have any ideas?

Thanks!

Hey @AdamBCBSNE ,

 

please upload the pbix with sample data to onedrive or dropbox and share the link.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

I got this one figured out!

I created these 3 measures:

 

Total = CALCULATE( SUM ( 'Sheet1'[StoryPoints] ) , ALL ( 'Sheet1'[AreaLevel] ) )
Selected = CALCULATE(SUM ( 'Sheet1'[StoryPoints] ) , ALLSELECTED ( 'Sheet1'[AreaLevel] ) )
NotSelected = CALCULATE( [Total] - [Selected] )
 
Then, I put the Selected and NotSelected measures in the pie chart Values. Voila! I still have a little formatting to do, but this is working great!
2019-12-19_13-27-38.png

Helpful resources

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

June 2025 community update carousel

Fabric Community Update - June 2025

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