Forum Discussion
Dynamic date vertical reference line or a dot in a line chart
How Can I add a dynamic or constant date vertical reference line in a line chart , where x axis will be date value, y will be actual component value and after that date reference line, color of that particular line should be changed to red. I know how to do this in Tableau but I want this in Power BI
hi, Amir851
A vertical reference line is not available now.
To work around this requirement, you can 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 like this, put this measure into column values.
Measures can be:
Measure 2 = IF(SELECTEDVALUE('Table'[Date])=TODAY()-15,1)Result;
Best Regards,
Lin
2 Replies
- v-lili6-msft
Community Support
hi, Amir851
A vertical reference line is not available now.
To work around this requirement, you can 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 like this, put this measure into column values.
Measures can be:
Measure 2 = IF(SELECTEDVALUE('Table'[Date])=TODAY()-15,1)Result;
Best Regards,
Lin
- AnonymousNot applicable
hello, do you mind elaborating on what is the -15 means in your measure ?and also what 1 refer to.
IF(SELECTEDVALUE('Table'[Date])=TODAY()-15,1)