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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dynamic Measure when hovered over Stacked Bar Graph

Hi,

 

I have created a horizontally stacked bar graph, the stack is the percentage of the duration attended by the guest of the event. I want to calculate the percentage of guests who were in the show for each category. I have written a measure but it is static, is it possible to make it dynamic when I hover over the stacked graph.

 

I can create a tooltip to see the result when I hover but I am not sure how to create the dynamic measure or a measure that would support the tooltip when hovered over the graph.

 

PCT = CALCULATE(COUNT('Table'[ID]),FILTER('Table','Table'[Pct Activity Category] = "76% - 100%"))/COUNT('Table'[ID])
 
 
Unable to Post the Image, posting the sample Data
 
ID      ||    Title                        ||     Category              ||  Pct Activity Category ||
1             Kevin Hart                     Comedy                    76% - 100%
2             Dave Chappelle             Comedy                    76% - 100%
3             Kevin Hart                     Comedy                    Less Than 10%
4             Dave Chappelle             Comedy                    10% - 25%
5             Eddie Murphy                Comedy                    76% - 100%
6             Eddie Murphy                Comedy                    76% - 100%
7             Kevin Hart                      Comedy                    51% - 75%
8             Kevin Hart                      Comedy                    10% - 25%
9             Dave Chappelle              Comedy                    26% - 50%
10           Eddie Murphy                 Comedy                    26% - 50%
 

Please go to the link to get sample data and a screenshot

Sample Data Link 

 

I am trying to find the percentage of guest attendance based on pct Activity Category when I hover on the graph. For Example, if I hover on Kevin Hart 76% - 100% cat, I must see a tooltip 23%(I know how to do the tooltip but I don't know how to write a dynamic measure which depends on hover), the same should happen for other categories.

 

Kevin Hart:

Total Guest: 21

Less Than 10% - 9.5%

10% - 25% - 14.2% 

26% - 50% - 9.5%

51% - 75% - 23%

76% - 100% - 23%

1 ACCEPTED SOLUTION

@Anonymous try this measure

 

PCT = DIVIDE ( COUNT('Sheet1'[Guest ID] ), CALCULATE ( COUNT ( Sheet1[Guest ID] ), ALLSELECTED ( Sheet1[Pct Activity Category] ) ))

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

8 REPLIES 8
parry2k
Super User
Super User

@Anonymous Can you share sample data with some screenshot, and what you are trying to achieve.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k Sure, I couldn't attach a screenshot, so I have uploaded it on the drive and shared the link on the Main Post.

 

@Anonymous try this measure

 

PCT = DIVIDE ( COUNT('Sheet1'[Guest ID] ), CALCULATE ( COUNT ( Sheet1[Guest ID] ), ALLSELECTED ( Sheet1[Pct Activity Category] ) ))

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k I tried the measure and on hovering over the graph I see the value 1.00. I have also provided more information with example in the main post, I hope it helps.

@Anonymous make sure change the format of PCT measure to % 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k Yes I did and it still gives me the same value(but now in percentage that is 100%) when I hover over the graph. I have attached 2 screenshot with the measure in the link (screen1 and Screen2) for your reference. I hover over 2 categories and seeing the same result(100%). 

@Anonymous see attached, not sure why it is not working for you.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k Thanks for sharing the Pbx file, that helped to figure out the issue in my report. I got to know the mistake I was doing, to maintain the order of percentage category in the stack graph, I was sorting it by assigning numbers to the percentage category (example Less than 10% = 1, 10% - 25% = 2 so far) and this was creating a problem. Just curious is there a way where I can sort it in the order and also have this tooltip. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors