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
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
Greg_Deckler
Super User
Super User

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()
)

@ 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...

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
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.