Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Filtering data

arkimp
8 - Asteroid

I have input like below.  I want to extract data based on the Current date.. 

 

If the "current date /system date" is < 7 ,  all the data to be extracted.  If the  "current date /system date" is > 7 , only current month data to be extracted..

 

Input:

Datevalue
2022-07-2110
2022-07-2220
2022-08-0140
2022-08-0950

 

 

As today's Date is 12, only this month data to be in output file.  please let me know, how can i achieve this?

 

Output:

Datevalue
2022-080140
2022-08-0950
5 REPLIES 5
DataNath
17 - Castor
17 - Castor

3rd edit: Realised my first attempt should actually be fine.

 

DataNath_0-1660296066778.png

ArtApa
Alteryx
Alteryx

Hi @arkimp - Here is a possible solution:

 

ArtApa_0-1660295506980.png

 

ArtApa
Alteryx
Alteryx

@arkimp - The difference between my and @DataNath solution is that my solution will process all records with one date. While the second solution will generate a date for each record and at midnight it will change.

flying008
15 - Aurora

Hi,@arkimp 

 

only filter as you need:

DAY(DateTimeToday())<7 || (DAY(DateTimeToday())>7  && MONTH([Date])=MONTH(DateTimeToday()))

 

录制_2022_08_12_17_16_26_669.gif

DavidP
17 - Castor
17 - Castor

Hi @arkimp 

 

I would typically do this in 2 steps with a formula and filter tool as I find it a bit easier to articulate the logic in a formula tool. 

 

One thing to note: What should happen on the 7th day of the month? I used  >= 7 for my logic

 

 

DavidP_1-1660296207889.png

 

 

 

 

Labels
Top Solution Authors