community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
Alteryx Gallery is experiencing a problem in which system emails are not being sent out. As a result, if you are attempting to sign up for a new account, you may be unable to verify your email address. We are working to solve this as soon as possible and will remove this notice once resolved.
SOLVED

Create a month field

Highlighted
Asteroid

Hi All,

 

I'm rather new to Alteryx, and I've been addicted to training videos to the point things are starting to get blurry.  :)

 

I've done a count distinct on a field and I want to be able to group those counts by month.  My date field is in this format  2017-02-15  (YYYY-MM-DD).  I'd love to be able to create a new field called Month, and parse the month from my dates into that field (in this style, Jan, Feb, Mar, etc.).   I've tried a couple of things but no success.    Using v11.  Using the date function DateTimeMonth([svcDate]) , I keep getting the error: Formula (8): The field "" is not contained in the record. (Expression #1).  Argh!

 

Please and thank you,

 

Paul

The expression you have will get the month number (1-12). The error is saying you haven't specified an output column name in the formula tool:

2017-11-25_07-37-21.jpg

 

 If you want Jan-Dec rather than 1-12 use the expression:

DateTimeFormat([svcDate],"%b")

Alternatively you can use a DateTime tool to take a date to a string with a custom format of 'Mon'

Asteroid

Thanks JD,

 

How do I specify a valid output column?  I'm referencing the original date field in both the output column and my expression.  This renders my Service Date field null.  If I use a 'new' column name in my expression, I get the same error as before.  Thanks for helping!!

 

dateformat.JPG

Asteroid

Nevermind.  I found the Add Column option.  Thank you for the solution.

Labels