Free Trial

Alteryx Designer Desktop Discussions

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

Creating a new colum by refering to other columns.

Arvnd-Alteryx
5 - Atom

Hello,

I am facing an issue with creating a workflow - I need to refer to the columns 'ID' and 'Phone' and make a new column 'Usage' as shown in the attachment. I tried using the joins but couldn't able to achieve it. 

Thank's in advance.

ArvndAlteryx_0-1686538766074.png

 

4 REPLIES 4
ShankerV
17 - Castor

Hi @Arvnd-Alteryx 

 

Step 1: Use the summarize tool to take the count

Step 2: Use the Join

Step 3: Use formula tool.

 

ShankerV_0-1686540512450.png

 

Input the data

ShankerV_1-1686540529929.png

 

 

ShankerV_2-1686540545027.png

ShankerV_3-1686540557907.png

 

 

 

ShankerV_4-1686540569948.png

 

 

ShankerV_5-1686540598378.png

ShankerV_6-1686540615052.png

 

 

 

ShankerV_7-1686540628905.png

ShankerV_8-1686540636542.png

 

IF [Usage]="2"
Then "Both"
ELSE [Phone]+" only"
ENDIF

 

 

ShankerV_9-1686540665515.png

 

ShankerV_10-1686540672774.png

 

 

 

Many thanks

Shanker V

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Hi @Arvnd-Alteryx ,

 

Here is one way of doing this.

If you want to keep the order, you may join the output back to the original table.

 

Workflow

Yoshiro_Fujimori_0-1686540197275.png

Summary Tool configuration

Yoshiro_Fujimori_1-1686540220563.png

 

Formula tool configuration

Usage = IF [Concat_Phone] = "Apple" THEN "Apple only"
ELSEIF [Concat_Phone] = "Android" THEN "Android only"
ELSEIF [Concat_Phone] = "Android,Apple" THEN "Both"
ELSE Null()
ENDIF

 

Output

Yoshiro_Fujimori_0-1686540479196.png

 

I hope this helps.

Arvnd-Alteryx
5 - Atom

Thank you for the quick reply.
Really appreciate your help @Yoshiro_Fujimori
ShankerV

flying008
15 - Aurora

Hi, @Arvnd-Alteryx 


I assume that your phone includes duplicates, so I think the following process is more rigorous:

 

flying008_0-1686542660613.png

 

Input  Output  
IDPhone IDPhoneUsage
111Android 111AndroidBoth
222Apple 222AppleApple only
333Apple 333AppleBoth
111Apple 111AppleBoth
444Android 444AndroidAndroid only
555Android 555AndroidAndroid only
666Android 666AndroidAndroid only
333Android 333AndroidBoth
777Apple 777AppleApple only
888Apple 888AppleApple only
Labels
Top Solution Authors