Forum Discussion
Stacked Bar Chart Tooltips
Hi All,
I have a stacked bar chart where i've brought in 3 measures:
1. Measure 1 calculates total sales for the selected financial year (based on slicer selection)
2. Measure 2 calculates total sales for the selected financial year minus 1
3. Measure 3 calculates total sales for the selected financial year minus 2
Is there a way to create a dyanmic tooltip where when a user hovers over the stacked bar chart, depending on which year they're hovering over, it shows the year details.
For example, in a stacked bar chart that has three years stacked, if i hover over FY20-21, i want my tooltip to show a measure that basically returns the year they're hovering over. BEcause i can't hardcode the year name, how do i make this dynamic in a tooltip?
Thanks in advance. Any suggestions are appreciated.
4 Replies
- lbendlinSuper User
Stacked Bar charts support custom tooltip pages. Using report tooltip pages in Power BI - Power BI | Microsoft Docs
- AnonymousNot applicable
Thanks for that.
I think the issue i'm facing is mostly around how my measures have been formed. Instead of using date column to break up the stacks, i've used measures that return previous year and previous year - 1 based on slicer selection. As a result, when i hover over the stacks, it doesn't tell me which year i'm hovering over.
I'm assuming i need a switch statement but i can't seem to make it work.
- v-xiaotangCommunity Support
Hi Anonymous
What are the values in your graph? Can you take a screenshot showing your current visual?
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- Mayank_YavdaResolver II
Hi Anonymous ,
Here is Stacked Column Chart with Custom Tooltip which will help you get separate or ungrouped tooltip for each stack.
Stacked Column Chart with custom tooltip PBIVizEdit.comStacked Column Chart with custom tooltip PBIVizEdit.com
Download link for the custom visual file in this page
https://pbivizedit.com/gallery/stacked-column-with-custom-tooltip
This was made with our Custom Visual creator tool PBIVizEdit.com. With this tool,
- anyone, irrespective of technical skills, can create their own visuals
- 15 minutes to create a visual from scratch
- opens up many additional attributes to edit (for e.g. labels, tooltips, legends position, etc)
Give this a shot and let us know if you face any problem/errors.
You can use the editor to modify your visual further (some modifications cannot be done in Power BI window and have to be in editor).Thanks,
Team PBIVizEdit