Filter specific day and time
- 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've used this for filter tool but doesn't seem to work as intended for the time part. The goal is to filter only the last update every Thursday at 8 am. But the run sometimes occur before 8 like 7:56 am.
DateTimeFormat([Last Update],"%A") = "Thursday"
AND
DateTimeFormat([Last Update],"%H") <= "8"
Thank you!
- Labels:
- Alteryx Practice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The filter tool only works with row-level logic. I.e it only checks if it meets the given row cell value condition.
In this scenario, you also need to check other rows to see if this is the latest DateTime before 8 am. You can achieve this by using the below logic.
1. Filter all rows which are Thursday and Hour is less than 8 am
2. Use the formula tool to extract only the date. This is helpful to groupby date and check the latest time for each date
3. Use the sort tool to sort data by descending
4. Use Sample to pick 1st row groupby on the date. Refer to the below link to understand how to use the sample tool.
https://community.alteryx.com/t5/Interactive-Lessons/Sampling-Data/ta-p/85807
This way the latest DateTime before 8 am for each date is selected.
Give it a try you can refer to the below workflow if you get stuck
Hope this helps : )
