Forum Discussion
Anonymous
7 years agoNot applicable
DATEADD
Hi All, I have this table I'm trying to reduce Date1 by the Month column and return the results in Date2. I'm using the formula; =dateadd(Resign_Append[Date1],-Resign_Append[Month]...
- Anonymous7 years ago
PMF99 ,
Here is the formula in DAX:
New Date DAX = VAR _year = YEAR ( Resign_Append[Date1] ) VAR _month = MONTH ( Resign_Append[Date1] ) VAR _day = DAY ( Resign_Append[Date1] ) VAR _monthToSubstract = Resign_Append[Month] RETURN DATE ( _year, _month - _monthToSubstract, _day )
PMF99
7 years agoRegular Visitor
Thanks NickNg.
Any idea how do perform this calculation in DAX as I have multiple queries in my model?
Anonymous
7 years agoNot applicable
PMF99 ,
Here is the formula in DAX:
New Date DAX = VAR _year = YEAR ( Resign_Append[Date1] ) VAR _month = MONTH ( Resign_Append[Date1] ) VAR _day = DAY ( Resign_Append[Date1] ) VAR _monthToSubstract = Resign_Append[Month] RETURN DATE ( _year, _month - _monthToSubstract, _day )