Consecutive month
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Community
- Data Science
- Resource
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Also @Pelumi50, for questions about workflows I would recommend the designer discussion board: Alteryx Designer Discussions - Alteryx Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
