Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,I want to add a dynamic vertical line by action date in line chart
| Action Date |
| 01-10-2022 |
| 01-02-2023 |
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:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks i know the problem and it work,But if i have more than 2 action date how can add it.
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:
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
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.