Add a Vertical Line to a Line Chart with text on the X-Axis
Post Tags: Hacks | Charts | Line Charts | Formatting | Vertical Line | Paid | All tags
This post was made with the February 2024 version of Power BI Desktop.
Let’s learn an easy trick to add a vertical line to a Line Chart when you’re using a text field on your X-Axis.
It’s easy to add a constant X-Axis vertical line when you have a numerical field on your X-Axis but there’s no built in functionality to add a vertical line when you have a text field on your X-Axis. Sometimes an X-Axis isn’t a bunch of dates. Sometimes you want a vertical line to denote when something happened (like the implementation of a program, a new process starting, a pandemic happening, etc).
This post is about a fun little hack I created to not only make adding a vertical line with a textual X-Axis possible, but EASY. :)