Alteryx Designer Desktop Discussions

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

Rows In Column Split using Alteryx

NitishSrivastava
7 - Meteor

Hello Team,

 

Pls help me on below query.

How we can split our country /city separately using Alteryx. Below is the sample of Input and Output data.

 

Input 
 
Country/City
England 
India
US
NewYork
Lords
Delhi
Mumbai

 

Output 
  
Country City
England Lords
USNewYork
IndiaDelhi
IndiaMumbai
9 REPLIES 9
Qiu
20 - Arcturus
20 - Arcturus

@NitishSrivastava 

I would really like to see how this get answered.

grazitti_sapna
17 - Castor

Hi @NitishSrivastava , I do not think there is any other way to sort this list automatically. One of the way I could think of is to provide a list of world cities along with the country then use join tool and join on the basis of cities. As shown in the screenshot below.

grazitti_sapna_0-1613547749543.png

 

This is the easiest and best way to do so according to me but let's see if anyone else has an interesting solution to solve this.

 

Thanks.

 

Sapna Gupta
Qiu
20 - Arcturus
20 - Arcturus

@grazitti_sapna 

You are making good suggestion, but I believe the Lords and NewYork is not legal City Names.

And the worldcity.csv looks familar.😁

grazitti_sapna
17 - Castor

@QiuYes, you are right!  Lords is a cricket stadium in England and New York is a city in United States whereas England is not listed as a Country anywhere therefore I used United Kingdom. The solution above is just a suggestion and the file can be customized as per the requirement.

Sapna Gupta
NitishSrivastava
7 - Meteor

Thanks a lot Sapna Gupta for giving your time on my query and response.

And yes we can sort this using join tool.

 

Best Regards

Nitish 

 

grazitti_sapna
17 - Castor

Hi @NitishSrivastava , I am glad my post is helpful to you. If it really helped can you please mark my post as solution so that it could be useful for other community members looking for something similar.

Thanks.

Sapna Gupta
NitishSrivastava
7 - Meteor

Hi Qiu,

 

This table is only to understand logic.

 

Thanks

Nitish

NitishSrivastava
7 - Meteor

Hi @grazitti_sapna ,

 

Marked ...!!

 

R, Nitish 

grazitti_sapna
17 - Castor

@NitishSrivastava , Thanks.

Sapna Gupta
Labels