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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
kt3734
Frequent Visitor

Dax query

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())
)

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

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,


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

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,


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Thank your for your help.  

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.