Power BI: add a current date line in a chart

When I use a date chart, sometimes it is quite useful to add a current line to show in the chart, the current date. To do it, the only condition is that the chart in the “x-axis” should be “continuous” and not “categorical”:

power bi

This is my line chart but I can use a clustered one or else, the process is the same:

power bi

First I will create a simple measure to get the current day:

power bi

Selecting my chart, I will click on the magnifying glass when inside the “x-axis constant line”, click on “add line”:

power bi

Click on the “fx” icon:

power bi

In the “what field should we base this on” field, select the measure:

power bi

And here, it is my current date line:

power bi

Interesting Topics