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?


How to create 3 new month columns


Hello All,


i would like to create 3 new latest month fields(Current Month,Previous Month,Previous Month-1),using 3 new fields i would like to get pull latest 3 months data to the workflow. please help me someone to achieve this. i have added the sample file


Thanks in advance



Anyone help me


@Niranjan123 This isn't working because of your date. I'd recommend changing the [vMonth] field formula in two ways:


1) change the datatype to "Date"

2) the formula should be datetimeparse([Date],"%m/%d/%Y"). Everything else should populate accordingly.


Thanks for your reply, i tried its not working for me, could you please post your workflow, its great help for me


the only change I made.




Note, this wouldn't get your previous three months sales, because you're dropping off those records in the join. You would need to join back to the original data at some point based on the other dates. That's why MonthValue, Month-1Value, etc are error.


i am able to created the month variables, i would planning to create the 3 new columns to pull the 3 latest months data, please suggest me


hi @Niranjan123 


Are you trying to get

1. The total spent in each of the 3 months?

2. The total spent in each store in each of the 3 months?

3. The total for each customer in each of the 3 months?  This last one will not give you much information since if we look at unique First Name, Last Name and Address, we only have 3 repeat customers. and 2,666 unique ones





Thanks for your reply, Based on Customer ID i Would like to display each month(Current month, previous month,Previous Month-1) Spends.


Hi @Niranjan123 


Your customerID is a unique per record field.  There are no duplicates customerIDs in your data set so there is no way to match customers based on this field.




Sorry I got it what your referring, I have created duplicates on Customer ID, same record now repeating from all months, Now I would planning to create the 3 new columns to pull the 3 latest months data. I have attached the updated sample file please check