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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
naveenvs
Frequent Visitor

Dynamic Date range on X axis for a Line Chart

I have a line chart that shows data for 2 projects (Line data is plotted cumulative over date). The projects can be selected using a slicer.

 

Now the issue is one project is spanned over 4 monts (Aug - Nov) and other project is over 2 months (Aug - Sep). when I select the latter, I need to break the X axis (Date) when the project ends in Sep. Is there a way I can make the X axis dynamic based on the selction of the project.

2 REPLIES 2
Anonymous
Not applicable

Hi @naveenvs ,

 

Sorry, based on my test, I can't reproduce your situation. My sample data is this and the result is the displaying by the gif. I switch from project A to project B, and the month automatically ends in September.

SalesDateProject

48/8/2020A
59/9/2020A
610/10/2020A
711/11/2020A
28/8/2020B
39/9/2020B
18/1/2020A
29/1/2020A
310/1/2020A
411/1/2020A
58/1/2020B
69/1/2020B

 

result dynamic1.gif

 

The pbix file which I tested is here.

 

Could you provide some more detailed sample data? And I will try my best to help you.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@naveenvs , ideally when the project, which is having two months of data, it should two display months only. but difficult to say without looking at data and formula and screenshot.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.