Adding a vertical line or marker to a chart in Power BI
- Prathy Kamasani

- May 17, 2018
- 2 min read
Updated: Nov 14
A business user came to me asking “how can I get a vertical line on Line Chart in Power BI like my Excel report?”. I was like, “It’s straightforward. We've this analytics pane which lets you add so many types of lines 😊 “. But, quite quickly I understood, I can't draw a vertical line as we do in Excel or SSRS.
Adding a vertical line or marker to a chart in Power BI
Data looks like below:
The user wants a marker, ideally a line to point those events on the chart. I can't think of an out the box option, but there are some workarounds. Let’s look at adding a line using Combo Chart. This chart clearly shows events as bars and tooltips can define what kind of event it was. I would prefer to change the bar width. It’s a bar; it’s not exactly a line; however, it fits for the purpose.
Next using Markers:
With latest Power BI update, We can set line stroke width to zero. So I decided to use that feature to highlight the events on the chart. It’s a simple Line Chart with one axis and two values. One value is to show the Value column and other to show Count of Event. My chart looks like this:
Then I updated X Axis type to Categorical (Otherwise, Markers functionality won't be available). Then under Shapes, setThen I updated X Axis type to Categorical (Otherwise, Markers functionality won't be available). Then under Shapes, setThen I updated X Axis type to Categorical (Otherwise, Markers functionality won't be available). Then under Shapes, setThen I updated X Axis type to Categorical (Otherwise, Markers functionality won't be available). Then under Shapes, setThen I updated X Axis type to Categorical (Otherwise, Markers functionality won't be available). Then under Shapes, setThen I updated X Axis type to Categorical (Otherwise, Markers functionality won't be available). Then under Shapes, setThen I updated X Axis type to Categorical (Otherwise, Markers functionality won't be available). Then under Shapes, setThen I updated X Axis type to Categorical (Otherwise, Markers functionality won't be available). Then under Shapes, setThen I updated X Axis type to Categorical (Otherwise, Markers functionality won't be available). Then under Shapes, setThen I updated X Axis type to Categorical (Otherwise, Markers functionality won't be available). Then under Shapes, set
Then I decreased Stoke width to 0 and increased Marker size to 16. Now the chart looks like this:

Tooltip don’t make much sense, but by using new Report tool tip pagesFunctionality we can have much more helpful and user-friendly tooltip like below:
Hope this post helps someone out there
Prathy 🙂










Comments