hi,
i have DATE field MONTH_YEAR WITH THE FORMAT '2018-07-01'- YYYY-MM-DD, which is CURRENT MONTH of each Customer
I have calculated PREVIOUS MONTH for each customer, so i have to put the condition FILTER where
MONTH _YEAR = PREVIOUS+1
OR
PREVIOUS_MONTH = MONTH_YEAR + 1
I have used this filter but its not working
[MONTH_YEAR]=DateTimeAdd([Previous_Month],1,"months")
can i get some help?
thanks
Solved! Go to Solution.
Can you share a workflow and example data?
Hi @nidah5,
Your formula [MONTH_YEAR]=DateTimeAdd([Previous_Month],1,"months") looks like it should work fine, however it may be worth checking data types. Are both [MONTH_YEAR] and [Previous_Month] fields stored as date data types? Otherwise a screenshot of the error would make it a lot easier to diagnose.
If this solves your issue pleas mark the answer as correct, if not let me know!
Regards,
Jonathan
yes, they all are in DATE format.
Hi @nidah5
DateTimeAdd() returns a DateTime data type, i.e. 2018-09-01 00:00:00. Even though this represents the same period as 2018-09-01, Alteryx sees them as different. Use this formula in your Filter
[MONTH_YEAR]=ToDate(DateTimeAdd([PREVIOUS_MONTH],1,"months"))
Dan