Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello Power BI Community,
I'm currently working on a project in Power BI where I need to create a date parameter with dynamic values such as today, yesterday, this week, last week, this month, last month, this quarter, last quarter, this year, last year, and a custom range with start and end dates.
I've explored various options but haven't found a straightforward way to implement this in Power BI. Can someone please provide guidance on how to create such a date parameter with dynamic range in Power BI Desktop?
Any tips, tricks, or workaround methods would be greatly appreciated.
Thank you for your assistance!
Best regards,
Manoj Prabhakar
Solved! Go to Solution.
Hi @manoj_0911
You can achieve it by creating the needed periods table.
Take a look at the linked video :
https://www.youtube.com/watch?v=jKBfMvhU9R0
And blog post with the scripts
https://forum.enterprisedna.co/t/dynamic-date-range-slicer-query-m/7217
You can modify the script according to your periods needs
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @manoj_0911
You can achieve it by creating the needed periods table.
Take a look at the linked video :
https://www.youtube.com/watch?v=jKBfMvhU9R0
And blog post with the scripts
https://forum.enterprisedna.co/t/dynamic-date-range-slicer-query-m/7217
You can modify the script according to your periods needs
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly