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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
jdballard30
Helper II
Helper II

Reference Line Dynamically Based on Date

I have a clustered column chart with my date along the x-axis and sales amount on the y-axis. I would like to be able to put a vertical reference line on the date when a salesperson enrolled in a marketing program, so I can visually see the sales amounts before and after their enrollment in a program. Something like the image below.

 

I found this post, and tried it, but it doesn't seem to be working.



 

reference line2.png

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @jdballard30

The post suggest a workaround using line and stacked column chart and put [sales amount] into line values , but as line values can't show legends, the chart only contains one line, it doesn't meet your needs.

The only way is to Use Shapes to create a static vertical line and it is not dynamic as explained.

 

I come up with another workaround which may indicate the enrollment in a program.

Use line and stacked column chart,  Add [sales amount] into column values, measure into line values,

 

Measure = CALCULATE(SUM(Sheet4[sales]),FILTER(ALLEXCEPT(Sheet4,Sheet4[salesman]),
[enrollment]=MAX([DATE])))

4.png

 

 

Best Regards

Maggie

Thanks for the suggestion. Am I correct, that this won't work if there are no sales on the given date? So, if the enrollment date is 10/7, but there are no sales on that date, then it won't display the measure on the line?

 

Either way, it's given me a few ideas to try out.

Hi @jdballard30

As tested, if the enrollment date is 10/7, but there are no sales on that date, then it still displays the measure on the line.

 1.png

 

Best Regards

Maggie

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.