Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
19 | |
7 | |
6 | |
5 | |
4 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |