Forum Discussion
Anonymous
5 years agoNot applicable
Need help on Calculation with Calculated columns
Hi All, I need your support in resolving the logic and syntax please: Logic: The calculated RTdate is 3aDate minus 4 weeks (omit any records with 3aDate blank) I have created a column in power ...
v-jingzhang
5 years agoCommunity Support
Hi Anonymous
DATEADD function expects a date column as the first parameter rather than a date value. You can add integers (positive and negative) to a date directly to get a date that many days after or before the date. Try DAX
RStatus =
IF (
ISBLANK ( [actual_date] ),
IF ( NOW () > [RTdate], "Overdue", IF ( NOW () > [RTdate] - 28, "4Due" ) ),
IF ( [actual_date] <= [RTdate], "onTime", "" )
)
And when you created a column in power query, what do you mean to omit that blank record? When a date value is null, Date.AddDays will return null too.
Let me know if you still have questions. Sample data is appreciated to help make the expected result easier to understand.
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.