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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
MSAYED26
Helper II
Helper II

Dynamic vertical line in line chart

Hello,I want to add a dynamic vertical line by action date in line chart

Action Date
01-10-2022
01-02-2023

MSAYED26_0-1719231785414.png

 

5 REPLIES 5
MFelix
Super User
Super User

Hi  @MSAYED26

 

Not sure how you want this to be dynamic but looking at the information you provide you need to add two new measure to your model:

Min Action date = MIN(ActionDates[Action Date])

Max Action date = MAX(ActionDates[Action Date])

Now on the option of the line visual add two reference lines with the X-Axis Constant line, one with each of the measure created previously:

MFelix_0-1719241904220.png

 

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks i know the problem and it work,But if i have more than 2 action date how can add it.

Anonymous
Not applicable

Hi @MFelix ,Thanks for your quick reply, I will add more.

Hi @MSAYED26 ,

If you have multiple dates, you need to create multiple measures.

The Table data is shown below:

vzhouwenmsft_0-1719823739957.png

Use the following DAX expression to create a column

Rank = RANKX('Table 2',[Action Date],,ASC,Dense)

Use the following DAX expression to create measures

Measure = MAXX(FILTER('Table 2',[Rank] = 1),[Action Date])
Measure 2 = MAXX(FILTER('Table 2',[Rank] = 2),[Action Date])
Measure 3 = MAXX(FILTER('Table 2',[Rank] = 3),[Action Date])

Final output

vzhouwenmsft_1-1719823949960.png

Best Regards,
Wenbin Zhou
If this post helps, please mark @MFelix  as the solution.

Thanks for reply,but can you find other way , because i have more than 20 action date

Thanks, but i dont have reference lines

MSAYED26_0-1719297271207.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors