I need help with my data. I want to be able to find customers that purchased products within the last two months or less. It could be consecutive or non- consecutive. I have been able to separate the months into another column but I need help identifying customers within the last two months or less.
Hey @Pelumi50,
The first step is to convert you text dates to a date data type. I do this with the date time tool. Next you can use a datetimediff formula to find the difference between the date and the current date in months:
Then you can filter based on the result. And summarize to get a list of customers:
If your interested in learning more about the datetime functions there is a great cheat sheet Blog here: https://community.alteryx.com/t5/Engine-Works/DateTime-Functions-Cheat-Sheet/ba-p/844353
Any questions or issues please ask
Ira Watt
Technical Consultant
Watt@Bulien.com
Also @Pelumi50, for questions about workflows I would recommend the designer discussion board: Alteryx Designer Discussions - Alteryx Community
If you are looking for anything within the last two months you could filter everything that is greater than datetimeadd(datetimetoday(),-2,'month') Or are you looking to customers last two month and could be separated by months.
That way you could sort by customer and sort by date in descending order and then sample tool the first 2 records grouped on customer.