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 August 31st. Request your voucher.

Reply
Anonymous
Not applicable

changing range of x-axis of a line chart using a date range slicer

Hi All,

 

I have a master calendar table with Date,Year, Month, YearMonthShortName and more and a fact table with data from Year 2013 till Year 2018 

 

I have a date range slicer

I have a trend line chart of sales measure from fact table.

 

The requirements is as below

 Create a chart such that the date range on the chart changes with the selected range on the date slicer. 

if 2nd of jan 2013 to 1st sept 2014 is selected the date range on the chart reflects same.

if 1st  of jan 2013 to 3rd of jan 2013 is selected date range on the chart reflects same.

 

 

The date range of the xaxis will show weeks if the date range selected is less than a month,

The date range of the xaxis will show months  if the date range selected is less than 12 months or more than 12 months 

How do i achieve this .

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , I doubt as of now you can change axis based on the selected range like time.

 

You can pass control in had of end-user to choose using field parameters https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thanks for the quick response.  

amitchandak
Super User
Super User

@Anonymous , I doubt as of now you can change axis based on the selected range like time.

 

You can pass control in had of end-user to choose using field parameters https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd

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
Anonymous
Not applicable

@amitchandak  what about if i want the date x axis  to show 13months backwards of any date selected on the date slier. how do i achieve this.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.