Alteryx Designer Desktop Discussions

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

conditional statement

iblackwell
5 - Atom

I am trying to combine multiple data sources for an HR project, there are assignment dates for jobs and effective dates for changes in pay, 

i am trying to find a way to say if the effective date if between these assignment dates(2 separate fields) then bring in wage. so far i am having no luck 

This is the forumla i have so far but obviously it does not work

 

[Start Date] >= [Asg_Start_Date] and [Start Date]<= [Asg_End_Date] then [Wages] endif any help would be appreciated.

iblackwell_0-1686864444315.png

 

5 REPLIES 5
binuacs
20 - Arcturus

@iblackwell try the below formula

 

If [Start Date] >= [Asg_Start_Date] and [Start Date]<= [Asg_End_Date]

Then [Wages]

Else

Null()

endif

Rana_Kareem
9 - Comet

@iblackwell Also, you can try this:

 

IF Between([Start Date], [Asg_Start_Date], [Asg_End_Date])
THEN [Wages]
ELSE Null()
ENDIF

iblackwell
5 - Atom

Thanks, this is more what i think im looking for, however i dont know if the between statement works as that is an unknown function.

 

iblackwell_0-1686869554430.png

 

iblackwell
5 - Atom

So that gave me data but it only returned about 2500 of the expected 90000. im thinking ]

 

If [Start Date] >= [Asg_Start_Date] and [Start Date]<= [Asg_End_Date]
Then [Wages]
Else
Null()
endif

i want the field payrate to pull the wages if the start date is between the asg start date and the asgn end date if that helps clarify. i may not be asking correctly. i.e if they are making $9 during this time then it would show, and when their wage changes to 10 it would show again. 

binuacs
20 - Arcturus

@iblackwell can you try the below formula?

 

If toDate([Start Date])>= toDate([Asg_Start_Date]) and toDate([Start Date])<= toDate([Asg_End_Date])
Then [Wages]
Else
Null()
endif

Labels