cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mshaivitz
Frequent Visitor

Annotating in a Line Chart with

Hi - I'm using this tutorial as the basis for adding an annotation.
https://community.powerbi.com/t5/Webinars-and-Video-Gallery/Annotating-Specific-Events-in-Line-Chart...

 

I am using a Slicer to display information by city. What I want to show is 'implemention begins' in each of the 31 cities in the Slicer. 

 

 

I have:

 

Note =
SWITCH(
MAX(India[reportingdate] ), 
VALUE("10/1/2017" ), "Implementation begins in <<FILTERED CITY NAME>>",
VALUE("04/1/2018" ), "Implementation begins in <<FILTERED CITY NAME>>",
VALUE("05/1/2018" ), "Implementation begins in <<FILTERED CITY NAME>>",
BLANK()
)
 
I'm not sure how to bring in the name of the filtered city (or if you can even do that with VALUE function). I also explored the SELECTEDVALUE function, but I'm not sure if that is correct. 

Thank you. 
 
2 REPLIES 2
Super User IV
Super User IV

Re: Annotating in a Line Chart with

You should be able to do something like:

 

 

Note = 
VAR __city = MAX('Table'[City])
RETURN
SWITCH(
MAX(India[reportingdate] ), 
VALUE("10/1/2017" ), "Implementation begins in " & __city,
VALUE("04/1/2018" ), "Implementation begins in " & __city,
VALUE("05/1/2018" ), "Implementation begins in " & __city,
BLANK()
)

---------------------------------------

Not the Power BI thought police...

I have NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

mshaivitz
Frequent Visitor

Re: Annotating in a Line Chart with

HI Greg, thank you so much, this is working. I'm wondering if you could help me around two issues I'm having:

 

1) When all the filters are selected, it shows a few random implementation dates - is this an IF statement, such as 'IF ALL Filters are selected, then show no dates"?

 

2) What would I need to do to show multiple start dates if more than one filter is selected?

 

Thank you, I appreciate your time. 

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors