In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

How to select last 5 days' records from each calendar month of given data set?

shivakumarmanian
6 - Meteoroid

Hi Team,

 

I have a bunch of sales records containing the sales dates.  I need to select all the records of last 5 days of each calendar month.  I would like to have the report saved in a file with Customer Name, Sale Date (only those records that are sold during the last 5 days of each calendar month).

 

Kindly help,

Thanks,

Siva

13 REPLIES 13
Peachyco
11 - Bolide

@TMHC : Here would be my approach to solving it:

Untitled.png

 

This is what my input looks like:

Untitled2.png

 

This is the resulting dataset. You can just unselect the Grouping Date and the Record Count using the "Select" tool.

Untitled3.png

 

TMHC
5 - Atom

Would you be able to provide the coding to be able to do this?

Peachyco
11 - Bolide

@TMHC : Here it is. Lemme know if it works for you. 😊

Jay2022
8 - Asteroid

hi @grossal  I tried using this solution you provided but it is not working for my needs. Essentially I am trying to obtain data from the last 7 days only and weekly.

Labels
Top Solution Authors