Alteryx Designer Desktop Discussions

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

Exclude last 4 days of month filter

markalves
8 - Asteroid

Hello,

 

I am filtering current month in a set of data which spans a half of a year.  But I also want to exclude the last 4 days of current month.  What would the formula be? I realize that my filter is not very sophisticated, and I should use a formula that finds the current month instead of hard coding the current month every month. Please help.

 

markalves_0-1643160757633.png

 

4 REPLIES 4
Qiu
20 - Arcturus
20 - Arcturus

@markalves 
Maybe it is a bit lengthy 😁
the left anchor is the result of filtering, and the J anchor is the dates that should be filtered out.

0126-markalves.PNG0126-markalves-1.PNG

RolandSchubert
16 - Nebula
16 - Nebula

Hi @markalves ,

 

if I got you right, this may solve your problem:

 

2022-01-26_08-44-37.jpg

 

DateTimeFirstOfMonth() returns the first date of the current month

DateTimeLastOfMonth() is the last date of the current month, using DateTimeAdd you can "adjust" the date to exclude the last 4 days.

 

Let me know if it works for you.

 

Best,

 

Roland

atcodedog05
22 - Nova
22 - Nova

Hi @markalves 

 

My take on this

 

Workflow:

atcodedog05_0-1643183726735.png

 

Hope this helps : )

 

markalves
8 - Asteroid

Thank you.  This worked perfectly.

Labels