Alteryx Designer Desktop Discussions

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

Filtering Dates

clarrock
8 - Asteroid

Hi,

 

How do I filter columns based on today's date. My input data changes daily

Eg : input

Number 2021-05-122021-05-13
Sam300400

 

Output

Name2021-05-12
Sam300

 

Is this possible? 

6 REPLIES 6
shreyanshrathod
11 - Bolide

@clarrock ,

 

Use "DYNAMIC SELECT" tool.

Configure it to "Select via a Formula".

 

In the Formula Pane, use [Name] = Datetimeformat(Datetimenow(),"%Y-%m-%d").

This should resolve your query.

 

Regards,

Shreyansh Rathod

shreyanshrathod
11 - Bolide

Also, if the data size is not so huge, you can TRANSPOSE the date columns, FILTER out today's date and then CROSSTAB the result.

This would work too.

 

Regards,

Shreyansh Rathod

clarrock
8 - Asteroid

@shreyanshrathod this works but the Name column is missing only the date column outputs - for the dynamic select option

apathetichell
19 - Altair

transpose date information - then use a filter with datetimetoday() set as the filter (for today) or dateatimeadd(datetimetoday(),-1,"days") for yesterday.

 

I'm going to point out that there is no reason to mess with dynamic select for this. this is a standard transpose/filter.

shreyanshrathod
11 - Bolide

@clarrock ,

 

You can always include more field names using OR condition.

E.g. [Name] = Datetimeformat(Datetimenow(),"%Y-%m-%d) OR [Name] = Name.

 

Regards,

Shreyansh Rathod

atcodedog05
22 - Nova
22 - Nova

Hi @clarrock

 

Using transpose tool and filtering out would a safe bet since it can accommodate more key columns easily.

 

Input:

atcodedog05_0-1620800692927.png

Workflow & Output :

atcodedog05_1-1620800724110.png

 

As you can see in the above example there is 2 key columns it could n columns in real scenario. Transpose and tool can easily accommodate more key columns.

atcodedog05_2-1620800873895.png

 

Then filter name to keep only current date and crosstab (make sure set the same key columns here) it back and it will give you only the current data columns. Refer the output in the above snapshot.

 

Hope this helps 🙂 Feel free to reach out if you have any questions.

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels