Forum Discussion

paynec's avatar
paynec
Regular Visitor
3 years ago
Solved

Tooltip using custom measure returning blank rows when event ended

Hi,    I have been working building a custom tooltip to show details of events which were active when a user hovers over a data point on my visualisation. The visualisation is a line chart for aver...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi paynec ,

     

    It seems like the measure you are using is pulling all the events that are in the date range of the current date. To only show the event that is active during the date range of the data point being hovered over, you can modify the measure to filter the events based on the date range of the data point. You may try the following measure:

    Event desc tooltip =
    VAR _CurrentDate = MAX(dimMOMA[Date])
    VAR _Events =
        CALCULATE(
            CONCATENATEX(
                'Events (Line)',
                'Events (Line)'[Description],
                UNICHAR(10)
            ),
            FILTER(
                'Events (Line)',
                _CurrentDate >= 'Events (Line)'[Event start date] &&
                _CurrentDate <= 'Events (Line)'[Event end date]
            )
        )
    RETURN
        _Events

    This measure will only concatenate the descriptions of the events that are active during the date range of the data point being hovered over. Let me know if this helps or if you have any further questions.

     

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.