Forum Discussion

BIDeveloper_'s avatar
BIDeveloper_
Frequent Visitor
2 years ago

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

  • Anonymous's avatar
    Anonymous
    Not 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_'s avatar
      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