Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

Dates

AHM
7 - Meteor

Hi,

 

I need help with dates plz. 

 

So, If I had a huge excel file with employee who were hired and fired. I have to determine when was there first day with the company and when was there last day, but the trick is that some of them were hired more than once within the same organization. For example, got hired Jan 1st, got fired Jan 31st. Then got rehired in November. This would be reflected in 2 separate rows in the data

 

If I imported data as usual, only the first row will show up (from Jan 1st to Jan 31st), there will be no mention about the other hiring in November. how can I show their first day and last day (Jan 1st & November) while showing that they took a break from Jan 31st to November (this can be in a different field)? 

 

 

 

 

 

7 REPLIES 7
DanM
Alteryx Community Team
Alteryx Community Team

@AHM 

 

I would highly recommend providing sample data here as well as sample workflow as to what you've tried thus far in Alteryx. I would also send a sample of what you want in the end. Without the data it would be difficult to give you a reply since we don't know the structure of your data.

 

DanM

Tyro_abc
11 - Bolide

Hi,

 

Can you provide some kind of sample data set. I will be glad to help you. 

Sample data set would help me to understand the problem. 

 

Best Regards

Arundhuti

danilang
19 - Altair
19 - Altair

Hi @AHM 

 

To get the ultimate first and last dates, use a Summarize tool grouped by employee and select the min and max dates. 

 

To get the ranges Sort by employee and start date.  Then use a Multi Row tool grouped by id to generate a GapStartDate equal to [row-1:EndDate]+1 day and then a formula tool to subtract 1 day from the current StartDate to give the GapEndDate.  The syntax to add datetime values is DateTimeAdd([Field],N,units).  N would be 1 and -1 to add and subtract and units ="days"

 

Dan

AHM
7 - Meteor

Thank you @danm,

 

So here is a sample. Employee X was terminated, but then rehired.

AHM_1-1616070965105.png

I want it as follow 

AHM_2-1616071338824.png

Before, I used to do this manually on excel. I used to do a pivot table and put "count" to reflect how many lines they have. and then do a VLOOKUP from the pivot table to get the count and if it was more that 1, I would check it manually. 

AHM_3-1616071618504.png

AHM_4-1616071887212.png

 

AHM
7 - Meteor

Thank you @Tryo_ABC,

 

So here is a sample. Employee X was terminated, but then rehired.

AHM_1-1616070965105.png

I want it as follow 

AHM_2-1616071338824.png

Before, I used to do this manually on excel. I used to do a pivot table and put "count" to reflect how many lines they have. and then do a VLOOKUP from the pivot table to get the count and if it was more that 1, I would check it manually. 

AHM_3-1616071618504.png

AHM_4-1616071887212.png

afv2688
16 - Nebula
16 - Nebula

Hello @AHM ,

 

I came up with a solution, look at it and let me know.

 

Untitled.png

 

Regards

Tyro_abc
11 - Bolide

Hi @AHM 

I created some extra rows for testing purpose. Let me know if this workflow works.

Tyro_abc_2-1616079103073.png

 Input Data:

Tyro_abc_3-1616079175774.png

 

2.Terminate 'm'  on 5/11/2020

Tyro_abc_5-1616079374933.png

 

3. Then add new hire date for 'm' 6/13/2020

Tyro_abc_6-1616079510736.png

Best Regards

Arundhuti

Labels