Hi, Can someone please help me, I need to write the following SQL in DAX
Thanks in advance
Go to Solution.
Hi @SuzieKidd ,
This is the correspondence between the sql function and the DAX function, please replace GETDATE() with today() or now().
Please refer to the following document for more information.
DATEADD function (DAX) - DAX | Microsoft Learn
DATEDIFF function (DAX) - DAX | Microsoft Learn
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
View solution in original post
@SuzieKidd , We have Datediff also in DAX.
But dateadd requires continuous dates
In case you need to subtract day , just do [mm] - 7
else use date as date add
Find out more about the May 2023 update.
Share your Data Story with the Community in the Data Stories Gallery.