The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
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
@bvy You can do this with a combo chart:
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"?
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 ?