We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Show "Y" in MAX DATE column for the maximum date for each user

wonka1234
10 - Fireball

Hi,

 

How can I create a max_date and min date for each Account ID?

 

The logic is ,  For each Account ID, where file_date_with_days is greater then the action date, show the minimum date with "Y" and show the maximum date with "Y". IF the File_date_with_days is less then action date show blank in the max and min columns.

These dates can range differently for each user.

 

 

Sample data (MAX and MIN columns here are expected outputs). Please also note , there are many more columns and account_ids in my actual dataset.

 

Account_IDc_Action_DateFile_date_with_daysMAX_DATEMIN_DATE
username56/27/202210/13/2022 Y
username56/27/202210/13/2022 Y
username56/27/202210/13/2022 Y
username56/27/202210/13/2022 Y
username56/27/202210/13/2022 Y
username56/27/202210/13/2022 Y
username56/27/202210/13/2022 Y
username56/27/202210/13/2022 Y
username56/27/202210/13/2022 Y
username56/27/202210/13/2022 Y
username56/27/202211/13/2022Y 
username56/27/202211/13/2022Y 
username56/27/202211/13/2022Y 
username56/27/202211/13/2022Y 
username56/27/202211/13/2022Y 
username56/27/202211/13/2022Y 
username56/27/202211/13/2022Y 
username56/27/202211/13/2022Y 
username56/27/202211/13/2022Y 
username56/27/202211/13/2022Y 

 

any help would be appreciated.

4 REPLIES 4
binuacs
21 - Polaris

@wonka1234 One way of doing this

 

binuacs_1-1674587165148.png

 

wonka1234
10 - Fireball

@binuacs  thank you for this. Not sure if this includes the logic that these max and min dates have to be greater then action date otherwise "". 

I guess my sample dataset doesnt have this built in.

binuacs
21 - Polaris

@wonka1234 Yes, I removed the MAX_DATE and MIN_DATE from the initial file you provided, and these fields (MAX and MIN) in the output are calculated fields

wonka1234
10 - Fireball

@binuacs but why no reference to action date?

Labels
Top Solution Authors