Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
bvy
Helper V
Helper V

Vertical Event Lines on a Trend Graph (Line Chart)

We are using a line chart to show trends over time -- dates along the X axis, metrics along Y. Pretty straightforward. We have a request to show vertical lines on specific dates (on the X axis) to represent an event -- a plant closure, process change, whatever. These events will come from a table (columns: date, event_text). The user might hover over the vertical line to see event text as a tooltip, or maybe it's accessible some other way.

 

The line chart allows adding constant lines, but I need something dynamic, even if it's a hack, such as overlapping visuals with the top one transparent. Third party visuals are only an option for us if they are PBI Certified.

 

Slight rant, but our users are tired of hearing Power BI can't do that. This particular request isn't far fetched at all, and my searching indicates that it comes up a lot. Still I can't find an accpetable, sustainable solution.

 

Here are some YouTube videos that almost deliver. The first one uses bars (can't be sized), the second uses points on the trend line (data is hard coded in DAX).
https://www.youtube.com/watch?v=6OgJX21cgMg
https://www.youtube.com/watch?v=XKmTknbusnY

 

I'm eager to hear your ideas. Thank you.

4 REPLIES 4
Anonymous
Not applicable

Hi @bvy,

Maybe you can try to use r visual, it allows you to plot the graph that combines charts with different effects.

abline R function : An easy way to add straight lines to a plot using R software 
Regards,
Xiaoxin Sheng

DataZoe
Microsoft Employee
Microsoft Employee

@bvy You can do this with a combo chart:

DataZoe_1-1608160897217.png

I added a table called Events with the date and description, then did a Events = DISTINCTCOUNT(Events[Event]) for a measure. I used that for bars.


Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Thanks.
With "combo chart" do you mean "Line and stacked column chart"?

Anonymous
Not applicable

Hi @bvy is it possible to create a line chart with 3 vertical event lines, and user can move those event lines through a date slider ?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors