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.
Hi,
I am working on DAX to create the paginated report and new to DAX query. I need to get the list of all orders where it's due > 2 weeks from now.
In sql, I can use this command DATEADD(DAY, + 14, GETDATE()), but I am not sure what is the correct way in DAX. I hope that you can help me with this. Thanks
EVALUATE SUMMARIZECOLUMNS (
'Backlog'[Due Date],
'Backlog'[Order Number],
FILTER ( 'Backlog','Backlog'[Due Date]>= DATEADD(DAY, + 14, GETDATE())
)
Solved! Go to Solution.
Hi @kt3734
In DAX, you can use TODAY() or UTCTODAY().
TODAY() returns the current date in the timezone of the server running DAX, which is UTC in the Power BI Service, but could be different when executed locally.
Also, you can add integers to date, with one day correponding to a value of 1.
For your specific query, I would also recommend applying a filter on the Due Date column rather than the entire table. You could also use variables for readability if you want. Something like this:
EVALUATE
VAR DateThreshold =
TODAY () + 14
VAR DateFilter =
FILTER (
ALL ( 'Backlog'[Due Date] ),
'Backlog'[Due Date] >= DateThreshold
)
RETURN
SUMMARIZECOLUMNS (
'Backlog'[Due Date],
'Backlog'[Order Number],
DateFilter
)
Regards,
Hi @kt3734
In DAX, you can use TODAY() or UTCTODAY().
TODAY() returns the current date in the timezone of the server running DAX, which is UTC in the Power BI Service, but could be different when executed locally.
Also, you can add integers to date, with one day correponding to a value of 1.
For your specific query, I would also recommend applying a filter on the Due Date column rather than the entire table. You could also use variables for readability if you want. Something like this:
EVALUATE
VAR DateThreshold =
TODAY () + 14
VAR DateFilter =
FILTER (
ALL ( 'Backlog'[Due Date] ),
'Backlog'[Due Date] >= DateThreshold
)
RETURN
SUMMARIZECOLUMNS (
'Backlog'[Due Date],
'Backlog'[Order Number],
DateFilter
)
Regards,
Thank your for your help.