In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Forecast Analysis

Seba
7 - Meteor

I am creating a workflow to compare the actuals of the month versus the forecast. At this point, I generated a formula to identify the "Month Type" for each period. However, the formula is not working for the lines corresponding to the period 01-2024, as these should be labeled as "Pending"

 

Formula.JPGResult.JPG

 

Any ideas?

Thanks and Happy thanksgiving!

3 REPLIES 3
CoG
14 - Magnetar

The issue is that you are working with string fields. I recommend converting to DateTime/Date type for proper comparison. You can use the DateTime Parse Tool twice (for each column) with MM-yyyy to capture the data. Your formula should work after that.

caltang
17 - Castor
17 - Castor

That is happening because you are using a matematical operator on a string, "10-2023" vs "1-2024" will probably just default to true. 

 

Try this:

IF ToString([MonthYear]) = ToString([Current Period])
THEN "Current Month"
ELSEIF DateTimeParse(ToString([MonthYear]),"%m-%Y") < DateTimeParse(ToString([Current Period]),"%m-%Y") 
TEHN "Accum"
ELSE "Pending"
ENDIF

 

Hope this helps. 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Seba
7 - Meteor

Thanks so much!

Labels
Top Solution Authors