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

Alteryx Designer Desktop Discussions

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

Update column Decision based on below inputs

vinayvnn
7 - Meteor

Hello Community, I have provided sample data here on my current task which I am working on and sample data provided below:

 

IDNameStart DateEnd DateCommentCountry of CitizenshipDecisionDecision Comments
1a1/1/20241/12/2024Start assignmentChina  
2b1/1/20241/12/2024Start assignmentUS  
3c1/1/20241/12/2024Start assignmentIndia  
4d1/1/20241/12/2024Start assignmentCanada  
5e1/1/20241/12/2024Start assignmentUK  
6f1/2/20231/12/2025On goingChina  
7g1/2/20231/12/2025On goingChina  
8h1/2/20231/12/2025On goingUS  
9i1/2/20231/12/2025On goingChina  
10j1/2/20231/12/2025On goingIndia  
11k1/2/20231/12/2025On goingUK  
12l1/2/20231/12/2024End assignmentUS  
13m1/2/20231/12/2024End assignmentUK  
14n1/2/20231/12/2024End assignmentChina  
15o1/2/20231/12/2024End assignmentUS  

first I want to filter the country of citizenship to US and China and then if user input is Citizenship 1st year then I have to update column "decision" as "Yes" where there is "Start of assignment" in "comment" column

if user input is citizenship all years then we need to update the column "decision" as "Yes" wherever we have "start assignment / on going and end assignment" in column "comment"

if user input is blank on either of condition then decision should be blank and need not to update the column, could some one provide any leads? much needed help. Thanks in Advance

2 REPLIES 2
OTrieger
12 - Quasar

@vinayvnn 
There are different ways how to go about
1. filter out US And China and then create the conditions with Formula tool
2. with the use of IF function with a Formula tool you will be able to do so. So if country is US or China do the condition.

kamanivk
8 - Asteroid

Use Formula tool, Select Decision column and add formula based on the conditions you need.

 

For Example:

IF [Input Column] = "Citizenship 1st year" and [Comment] =  "Start of assignment"

THEN [Decision] = "Yes"

ELSE [Input Column] = "citizenship all years" and ( [Comment] = "Start assignment" or [Comment] = "On going" or [Comment] =  "End assignment" )

THEN [Decision] = "Yes"

ENDIF

Labels