Filtering the data
- 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
Hi
I want to filter the data for those row which has punch-in and punch out for the same date.
For ex EMP ID 101 For date 09-03-2022 he has punch in and out for same in same day in first row.
I just want to take such type of rows where punch out is before 24:00:00.
How can we do this?
Thank you in advance.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @sgaryali,
you can do this using a filter tool and using the custom filter. The main thing here is to transform both your texts to dates understood by alteryx. To do this you can use the formula DateTimeParse and then set the date format.
I did it with the formula below in the filter : DateTimeParse([Punch-In],'%d-%B-%y') = DateTimeParse([Punch-Out],'%d-%B-%y')
This formula transforms your text to a date and then compares both it does not take into account the hours/minutes
I hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @sgaryali, how does this look? Within the Filter expression, I'm just using the DateTimeParse() function to convert your incoming dates into a format that Alteryx knows and can work with. The '!=' part is just saying that the dates don't equal each other and we therefore get the following outputs:
True anchor - dates different:
False anchor - Dates are the same:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @DataNath
May be I was not able to explain it better.
But this is not the solution I am looking at.
I want to filter out that data which has Punch IN and Punch out for the same date (Column D & E)
& Column C
For ex Emp ID 101 - His Schedule date is for 09-03-2022 and he is punching in 09-03-2022 21:00 and punching out at 09-03-2022 23:30 in same date which is row no 2.
Where Emp ID 103 - His schedule date is for 09-05-2022 and he is punching in on 09-05-2022 21:00 and punching out at 09-06-2022 12:30
but for the same Emp ID we have same scenario in row 6 as of the above like row no 2 but since we already have initial punch in and punch out for the same date we are not going to consider it.
I know it is bit confusing but I hope I was able to clear it out.
Thanks let me know if require further clarification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@sgaryali I'm not sure I'm following sorry. So all 3 of the dates (Date, Punch-In, Punch-Out) need to be different, and if they're the same, filter them out? With you mentioning EMP IDs, do the records for each ID need summarizing/grouping to find the first punch-in and last punch-out and then work from that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@sgaryali , please find the workflow. I have created it covering all the scenarios told by you and as per my understanding. Please let me know if it helped.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I got the solution.
Thank you :)
