Forum Discussion
How to customize tooltips to show different values for different measures?
Hello,
Ive created the following bar chart that shows 2 measures showing current year data and previous year (same period last year using dax). This data is shown against time (month in this case)
So in the picture above the previous year bar should ideally display in the tooltip, the month as dec 2023 not december 2024 but since im using the month from the date dimension table, im not sure how this is possible.
Ive tried exploring report tooltips but it seems that it doesnt allow the sort of switching that is required in this case.
Would appreciate the help, Thanks!
6 Replies
- MFelix
Super User
Hi Nawalasim8 ,
For this you would need to do one of two things:
- Add a measure with the calculation of the previous year month to the tooltip option of the visual so you would get 3 values on the tooltip.
- Create a custom tooltip to show what you need
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-tooltips
- Nawalasim8Regular Visitor
Hello, thanks for the help. While this can be done, is there a way i can customise the tooltip for each bar instead of showing the same measures for both bars in the tooltips? The report tooltip feature also doesnt seem to allow for this
- MFelix
Super User
Hi Nawalasim8 ,
You can try to use a field parameter and then a switch measure to do the calculation.
Use the Current value and the previous one for the Field parameter then a measure similar to :
Calculation values = SWITCH (SELECTEDVALUE(Parameter[Parameter Order] ), 0, [CY], [PY])Then add this has your measure.
Create a tooltip page with the parameter in order to get the correct value.
- AnonymousNot applicable
Hi Nawalasim8
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- AnonymousNot applicable
Hi Nawalasim8
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If our responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you. - AnonymousNot applicable
Hi Nawalasim8
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the community members for the issue worked. If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Thanks