I'm a student trying to use Alteryx for the first time and I'm having trouble with a basic formula trying to calculate depreciation/carrying cost for any inventory purchased during the year. This is what I have:
IF [Acquisition/Maturity Date]>=2020-06-30 AND [Acquisition/Maturity Date]<2021-06-30 THEN [Cost]*(.2) ENDIF
Can someone enlighten me as to where I'm going wrong? Thanks!
If your issue is that you are getting an error, that is because IF statements must be of the form
IF ... THEN ... ELSE ... ENDIF
It looks like you may be missing an ELSE statement.
Happy Solving!!!
IF [Acquisition/Maturity Date] >= '2020-06-30' AND [Acquisition/Maturity Date] < '2021-06-30' THEN
[Cost] * 0.2
ELSE
[Cost] // Placeholder for ELSE, you can modify this based on your requirements
ENDIF
This formula calculates the depreciation/carrying cost for inventory purchased during the specified date range. If the acquisition/maturity date falls between '2020-06-30' (inclusive) and '2021-06-30' (exclusive), it will calculate the cost multiplied by 0.2. Otherwise, it will use the original cost as a placeholder in the ELSE part. Adjust the ELSE part based on your specific requirements.
Thank you both very much! I appreciate the feedback, and using your responses I was able to get exactly what I needed.
Glad we could help and well done! Please kindly mark as solved so that others can more easily find the solutions they're looking for. (You can mark both mine and @Hammad_Rashid 's answers as solutions)
Happy Solving!!!