Forum Discussion
dhamodarankms
6 years agoNew Member
DAX - DATEADD Function
Dear Power BI Community, I am Dhamo, Power BI Reports and Dashboards developer along with Data engineering and Modeleling. Today, I am doing a Date Model and found a wired situation while used DA...
amitchandak
6 years agoSuper User
dhamodarankms , dateadd work with continuous dates. Means you need to have date in your date table for that. Make sure you have all dates in date table.
You can also use date for day, month and year as date add
example
Today = TODAY()
Month Back Date = Var _DT = Today()
return Date(year(_DT),Month(_DT)-1,Day(_DT))
Year, Month, day Back Date = Var _DT = Today()
return Date(year(_DT)-1,Month(_DT)-10,Day(_DT)-1)
refer
dhamodarankms
6 years agoNew Member
Thanks. I am using computed date table and the dates are contnious. I am wondering the logic is working fine for Day operations but not for the rest. Yes, it is always good to go with DAX Query instead of Simple DAX expressions. I thought that, the DAX expressions are much powerfull and not having any restrictions by comparing to DAX Queries & Statements.