Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Annotating graph with events

I have a graph that's plotted with a Date Table with MMM-YYYY as the x-axis (shown below):

image.png

 

I want to add annotations to it via the tooltips but need some help.

I created another table with events and MMM-YYYY and was wondering whether I can use this table to annotate the graph above.

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

We can create a inactive relationship between tables based on _Date table [_Date(months)] and Event table[_Event Date(Month)]. Then we can use the measure as tooltips to work on.

 

tooltip= CALCULATE (MAX(Event table[Event]),userelationship (_Date table [_Date(months)],Event table[_Event Date(Month)]))

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Tried both proposed solutions but neither worked.

 

The events table that I have is an excel spreadsheet with 2 main columns: Event Date and Event.

 

I want to be able to hover over or click on a given month/year in the graph and have some annotation in the tooltips.

 

Here's the date table I have:

image.png

 

And here's the events table:

image.png

 

 

If I were to select/hover over the spike in the orange line right before 2018 (which would be Dec 2017), I want the tooltips to display "Dim Screen"

Hi @Anonymous ,

 

We can create a inactive relationship between tables based on _Date table [_Date(months)] and Event table[_Event Date(Month)]. Then we can use the measure as tooltips to work on.

 

tooltip= CALCULATE (MAX(Event table[Event]),userelationship (_Date table [_Date(months)],Event table[_Event Date(Month)]))

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Greg_Deckler
Super User
Super User

Sure, you could do something like the following. Obviously I do not know your tables and code but hopefully this gets the idea across.

 

ToolTip Measure = 
VAR __Date = MAX('Date Table'[Date])
RETURN
  CONCANTENATEX(
    FILTER(
      'Events',
      [EventDate] = __Date
    ),
    [Description],
    ","
  )
      

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

The information you have provided is not making the problem clear to me.

But if you date table is at date level and you trying to join the data to MMM-YYYY column from another table which data in MMM-YYYY format, that will create Many to Many. Better would be

 

Create date in another table

Date = "01-" & Table[Month Year] // Only if it is in MMM-YYYY format.

Change data type of this as date. And Join using This new date to date table

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors