Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello everyone,
I have created DAX queries to calculate counts of various records. These DAX queries works based on last_week_start_date, last_week_end_date, next_week_start_date and next_week_end_date.
I was thinking is there a way I can accept user input for these 4 variables so that I no need to hardcode any dates in DAX.
Thanks,
Karthik
@Anonymous , Two date ranges?
But remember you can not initialize the date ranges
How to use two Date/Period slicers: https://youtu.be/WSeZr_-MiTg
Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=35
or week vs Week
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8
Hello @amitchandak ,
Thanks for your response but my requirement was different than your solution. But anyway thanks for your reply.
Hi @Anonymous ,
What do you mean about accepting user input? Does it mean selecting a value in slicer or parameters ? What is the output you want?
Best Regards,
Winniz
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 77 | |
| 37 | |
| 31 | |
| 29 | |
| 26 |