Forum Discussion
Dynamic Date Axis Based on Period Slicer (Day, Week, Month Granularity)
Hi V-yubandi-msft ,
Yes, one slicer, to automatically change between day, week, and month based only on the Period slicer selection.
Thank you!
Thanks again for sticking with me through this. I’ve now set up the report to work just the way you described.
You can use the Period slicer to control both the time logic and the X axis granularity. Behind the scenes, I’ve used bookmarks to switch between different visuals (day, week, month) depending on what’s selected. So even though Power BI doesn’t let us change the axis directly from a slicer, this setup gives you a smooth, dynamic experience all from one control.
Each chart shows the right comparison between the current period and the same period last year, and updates automatically based on your selection.
Please check attached .PBIX file for more details.
Best,
Yugandhar.
- V-yubandi-msft1 year ago
Community Support
Could you let us know if your issue has been resolved or if you are still experiencing difficulties? Your feedback is valuable to the community and can help others facing similar problems.
Thank You.
- BJankic1 year ago
Helper II
Hi @V-yubandi-msft ,
Thank you for your effort, but this isn’t quite what I was expecting. First, I wanted to avoid using bookmarks. Second, you can see that it’s not performing as expected, for the rolling 12 months, it should be comparing periods rather than showing them all in a single line chart. The same applies to the other timeframes as well.
Best regards,
Bojan
- V-yubandi-msft1 year ago
Community Support
Hi BJankic ,
Thank you for clarifying. I understand you're aiming for a dynamic date axis that updates based on the selected period, without relying on bookmarks.
Currently, Power BI doesn't provide a direct way to change axis behavior dynamically via slicer input. While bookmarks are a flexible workaround, I see you prefer not to use them.
We can look into alternative methods, such as adjusting calculations to simulate dynamic behavior. This approach may not fully replicate true axis switching, but it could be a close alternative.
if you're open to revisiting bookmarks in a limited way happy to help tailor something that fits your workflow.
Regards,
Yugandhar. - BJankic1 year ago
Helper II
Hi V-yubandi-msft,
Thanks for clarifying. Let’s try the calculation based approach.
Best regards,
Bojan
- V-yubandi-msft1 year ago
Community Support
Hi BJankic ,
Thank you for your patience. I’ve reviewed the solution and made some updates it’s now functioning properly without bookmarks. I hope this aligns with your needs.
When you have a chance, please review the attached PBIX file and let me know if it works for you or if any further changes are required.
Best regards,
Yugandhar.
- BJankic1 year ago
Helper II
Hi V-yubandi-msft ,
Thank you for your effort, but unfortunately it is not working properly.
First thing X axis should show like this (days, weeks, months) for selected period :
MTD vs. Last Year MTD → show by days
QTD vs. Last Year QTD → show by weeks
Current YTD vs. Prior YTD → show by weeks
Rolling 90 days → show by weeks
Rolling 12 Months → show by months
Second, you have overlaps in terms of the years in the view and time frame is staying the same.
- V-yubandi-msft1 year ago
Community Support
Thank you for staying engaged and sharing your concerns.
I understand that this issue might require a more detailed, hands-on approach. While we've covered several possible solutions, I recommend reaching out to a certified Power BI partner for support tailored to your specific needs.
Power BI Partners – Power BI Partners | Microsoft Power Platform
- V-yubandi-msft1 year ago
Community Support
Hi BJankic ,
I wanted to follow up to see if you were able to reach out to the Power BI partner community we recommended earlier. If you have any updates or responses, please share them here, as they may benefit other community members.
Regards,
Yugandhar