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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
barbaraferreira
Regular Visitor

DATEADD

Hi guys, 

 

I'm having a issue with the DAX function DATEADD, I'm trying to compare some metrics week by week, did you guys know how to use function with the interval of week?

 

1 ACCEPTED SOLUTION
cosm
Resolver II
Resolver II

Hi.

Please provide some more information of what your data looks like and what you want to achive.

Regarding the function DATEADD: make sure you use correct syntax, e.g.:

 

New_Date = DATEADD('Sales'[Order Date], 30, DAY)

 


You might also consider looking into Time Intelligence Functions in Dax:
https://learn.microsoft.com/en-us/dax/time-intelligence-functions-dax

Or combine Calculate (second argument filter context) and Previous Week to calculate a sum or similar previous week:

 

Sales WoW = CALCULATE(SUM([Sales Amount]), PREVIOUSWEEK(Calendar[Date]))

 


Hope this helps you on your way.

Kind regards!

View solution in original post

1 REPLY 1
cosm
Resolver II
Resolver II

Hi.

Please provide some more information of what your data looks like and what you want to achive.

Regarding the function DATEADD: make sure you use correct syntax, e.g.:

 

New_Date = DATEADD('Sales'[Order Date], 30, DAY)

 


You might also consider looking into Time Intelligence Functions in Dax:
https://learn.microsoft.com/en-us/dax/time-intelligence-functions-dax

Or combine Calculate (second argument filter context) and Previous Week to calculate a sum or similar previous week:

 

Sales WoW = CALCULATE(SUM([Sales Amount]), PREVIOUSWEEK(Calendar[Date]))

 


Hope this helps you on your way.

Kind regards!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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