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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Jilanibasha
Frequent Visitor

Dynamically change/display category lables as per the selected time interval range.

Hi All,

I have a report with slicer filter on date range and displaying data in line chart(date and revenue).  My requirement is need to chage the chart lables dynamically based on selected time interval. 

ex: if i select date range for 7 days it should display x axis lables as date

if i select date range is 7 to 30 days then x axis lables should be week

if i select more than 30 days lables shoud display as month-year.

 

Could you please some provide hints or how can i proceed with this kind of requiremet.

Thanks in advance

Basha

 

 

 

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Jilanibasha , changing the axis based on the range is not possible.

You can uses bookmarks, but that will not serve the exact purpose https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

View solution in original post

Hi @Jilanibasha ,

 

Based on my research, it seems that there is no approach meets your requirements except the bookmark. The Date hierarchy would not dynamically change by the date range you selected in slicer.

 

As a workaround, I suggest you create a new disconnected table for all the date hierarchy. Please follow the steps in https://radacad.com/dynamic-x-axis-on-charts-power-bi

 

You can also learn more about dynamic x-axis by slicer from:

 

https://community.powerbi.com/t5/Desktop/Dynamic-change-in-X-Axis/td-p/86167

https://www.kasperonbi.com/dynamically-switching-axis-on-visuals-with-power-bi/

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Jilanibasha , changing the axis based on the range is not possible.

You can uses bookmarks, but that will not serve the exact purpose https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

I think bookmark will not serve my expectation. Is there any work around for this?

Hi @Jilanibasha ,

 

Based on my research, it seems that there is no approach meets your requirements except the bookmark. The Date hierarchy would not dynamically change by the date range you selected in slicer.

 

As a workaround, I suggest you create a new disconnected table for all the date hierarchy. Please follow the steps in https://radacad.com/dynamic-x-axis-on-charts-power-bi

 

You can also learn more about dynamic x-axis by slicer from:

 

https://community.powerbi.com/t5/Desktop/Dynamic-change-in-X-Axis/td-p/86167

https://www.kasperonbi.com/dynamically-switching-axis-on-visuals-with-power-bi/

 

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

 

Best Regards,

Dedmon Dai

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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