Hi All,
Can somebody help me with my scenario?
I have one input as a database, with an example below.
Example:
Input sample
ID | Company_name | contract_agreement | Date | Quantity | Price |
T1 | McDonalds | 67829 | 2022-03-31 | 45 | 3.25 |
T2 | Burger King | 12549 | 2022-11-25 | 26 | 65.51 |
T3 | Wendys | 36548 | 2022-12-20 | 2 | 26.54 |
T4 | Chick-fil-a | 45624 | 2023-01-04 | 4 | 2.36 |
T5 | In-N-Out | 45872 | 2024-06-06 | 89 | 36.48 |
I will be running this workflow on January 1st 2023, 2024, 2025,... so ideally what this filter would do is filter out rows T4 and T5 because they come after December 31st 2022 and when I run it next time on January 1st 2024 it would only filter out T5 because it comes after December 31st 2023.
Solved! Go to Solution.
Hey @Travis_Ratliff,
Here is one way to do this using the datetime functions in a filter tool:
Essentially I use the datetimenow function to get the current date and from that I get the current year. Then I just create a date from that set at the end of December this year and filter from that.
If your interested in learning more about the datetime functions there is a great cheat sheet Blog here: https://community.alteryx.com/t5/Engine-Works/DateTime-Functions-Cheat-Sheet/ba-p/844353
Any questions or issues please ask
Ira Watt
Technical Consultant
Watt@Bulien.com
So, if I ran this on January 1st 2023 it would filter for the dates after "2023-12-31" because that is the current year. But I would want it to filter for dates after "2022-12-31". So that is what I am trying to do is figure out how to filter it for the previous year. I hope that makes sense.