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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
manoj_0911
Post Patron
Post Patron

Creating Dynamic Date Parameter for X-Axis in Power BI Dashboard

Hello Power BI Community,

 

I'm currently working on a Power BI dashboard that consists of four different charts, all sharing a common feature: the x-axis is a date field while the y-axis displays various durations, representing IVR data.

I'm seeking guidance on how to create a dynamic date parameter that offers users the flexibility to choose from the following predefined values:

1. Today
2. Yesterday
3. This Week
4. Last Week
5. This Month
6. Last Month
7. This Quarter
8. Last Quarter
9. This Year
10. Last Year
11. Custom Range (with start and end dates)

Based on the selected parameter value, I need the x-axis in the charts to dynamically adjust as follows:

- For "Today" and "Yesterday" selections: x-axis changes to the hour.
- For "This Week" and "Last Week" selections: x-axis changes to the date.
- For "This Month" and "Last Month" selections: x-axis changes to the week number.
- For "This Quarter," "Last Quarter," "This Year," and "Last Year" selections: x-axis changes to the month.
- For "Custom Range" selection: x-axis changes to the date.

Could you please provide guidance or step-by-step instructions on how to implement this dynamic date parameter functionality in Power BI?

Your assistance would be greatly appreciated.

Thank you in advance for your help!

 

Best regards,
Manoj Prabhakar

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @manoj_0911 ,

What you need sounds like it could be accomplished with a Field parameter. When you create the visual object, put the Field parameter into the X-axis, and dynamically change the content of the x-axis display by what is selected in the slicer.
You can refer to this official documentation:
Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn
You can also refer to my reply in this thread:
Solved: Re: Switch a visual between two different dates - Microsoft Fabric Community

Alternatively, because of the relative complexity of the effect you are trying to achieve, perhaps using bookmarks would be a good option. That is, create a bookmark for all the visual objects you want to display and set the visibility, and create buttons for all the bookmarks. Then you can quickly switch to the bookmarked visual object by clicking on the button.
You can refer to the method in this thread:
Solved: chart type change on published bookmarks - Microsoft Fabric Community

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @manoj_0911 ,

What you need sounds like it could be accomplished with a Field parameter. When you create the visual object, put the Field parameter into the X-axis, and dynamically change the content of the x-axis display by what is selected in the slicer.
You can refer to this official documentation:
Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn
You can also refer to my reply in this thread:
Solved: Re: Switch a visual between two different dates - Microsoft Fabric Community

Alternatively, because of the relative complexity of the effect you are trying to achieve, perhaps using bookmarks would be a good option. That is, create a bookmark for all the visual objects you want to display and set the visibility, and create buttons for all the bookmarks. Then you can quickly switch to the bookmarked visual object by clicking on the button.
You can refer to the method in this thread:
Solved: chart type change on published bookmarks - Microsoft Fabric Community

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors