Forum Discussion
Identify significant dates on a line chart
Is there a way to insert a line or a call out on specific dates on a line chart. I'd like to point out significant dates.
5 Replies
- amitchandak
Super User
Turf03 , The information you have provided is not making the problem clear to me. Can you please explain with an example.
ideally, Insert should have value and removal means blank value
Appreciate your Kudos.- Turf03
Helper II
amitchandak for example, I would like to identify a holiday on the line graph
- amitchandak
Super User
Turf03 , For that One way is to have conditional formatting, which only possible when you have one measure and no legend .
So create a measure like example
Color Date =
var _min =minx(allselected(Date,Date[Year])
return
Switch( true(),
FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"lightgreen",
FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"blue",
"red")Now first create BAR visual and do conditional formatting and in that use "Field Value" Option
refer
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-valuesOther is have a line with blank and nonblank values based on condition. Refer I use that in this blog
- v-xicai
Community Support
Hi Turf03 ,
You may insert Shapes (such as line or Triangle) into the specific location which you want on Axis of chart, and it is not dynamic as explained. See the attached screenshot.
In addition, you may try to use a combination chart.
- Create a "line and stacked column chart"
- Put column [Date] into shared axis , and put [values] into line values.
- Create a measure that evaluates to the maximum value when Date=specific date(otherwise blank), put this measure into column values.
You may create measure like DAX below:
Specific Date line = IF ( VALUES ( Table1[Date] ) = DATE ( 2020, 9, 1 ), MAXX ( ALL ( Table1[Date] ), MAX ( Table1[Sales] ) ))Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- P_D_G
Resolver III