ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

If and Statement with Date Range as one condition

ruddikl
アトム

Hi!

 

I'm attempting to write an If statement that is needs to Check the "Posting Date" column for a value that is not the first day of that month (Not the current month) I also need it to ensure a different column has the term "DEM_ACC in it. I think its returning the first of the current month and not the month I need (April) but I cannot figure out how to make it work.

 

Here is what I have so far, but I cant get the date functionality to work for me

 

IF [Posting Date]>DateTimeFirstOfMonth() AND
[Type Code 1]="DEM_ACC"
THEN "1"
ELSE "0"
ENDIF

4件の返信4
mbarone
16 - Nebula
16 - Nebula

IF [Posting Date]>DateTimeTrim([Posting Date],'firstofmonth')

ruddikl
アトム

Thank you so much! So easy, and yet I have been struggling for a few hours!

mbarone
16 - Nebula
16 - Nebula

We've all been there, very welcome!

cmcclellan
マグネター

Another tip ..... don't use

 

THEN "1"

 

that creates a string field that is (really) a number, instead use

 

THEN 1

 

make sure the datatype is numeric and that makes it easier to add later without the need to change datatypes again 

ラベル
トップのソリューション投稿者