Forum Discussion
Dynamic Date Tooltip Bar Chart
Hello,
It is possible to have dynamic tooltip for date?
I am tring to write proper DAX but it doesnt work.
The problem:
Current date is visible in tooltip both for PY and Current Value (on X axis it is current date 07.2023 and it is ok) .
Only value is changing properly - PY and Current Value is visible in a tooltip depending on which bar we are hoovering.
Soultion which I am looking for:
I would be grateful for any advice.
3 Replies
- christinepaytonMost Valuable Professional
You'd need to use FORMAT() in your DAX to format your date the way you want it. Bas has a video on the custom data labels here - I think you could probably get it onto two lines by using the UNICHAR() character for a line break. https://www.youtube.com/watch?v=J56xoO5tWhk
- AnonymousNot applicable
Hi BIDeveloper_ ,
I suggest you to create a Calendar table with continuous date to help your calculation.
Calendar = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"Day",DAY([Date]))Measure:
Prev Year Month = CALCULATE(SUM('Table'[Value]),SAMEPERIODLASTYEAR('Calendar'[Date]))Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- BIDeveloper_Frequent Visitor
Thank you for your effort but unforunatelly I am looking for some solution to have this information only in a toolip. Why? Because the bars are changing (there is another measure) - the user can pick what kind of measures (bars) are presented on one chart