The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
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.
SOLVED

Determine If City Is Present Of Country Or Not?

Kavya132017
8 - Asteroid

I have 2 columns, City & Country. I want an extra column of Flag Yes/No based on location of city in the country or not.

 

example:

 

City                             Country                          Flag 

Mumbai                         India                             Yes

Amsterdam                Australia                           No

Toronto                        USA                                No

New Jersey                 USA                               Yes

 

 

Any help is appreciated.Thank you

 

 

3 REPLIES 3
Yoshiro_Fujimori
16 - Nebula
16 - Nebula

Hi @Kavya132017 ,

 

I think you need a table of Country / City pairs you refer to.

Once you have such a table, you can simply JOIN to know if each Country/City pair is on the table or not.

 

You can look for such database from somewhere on Internet, but I guess you cannot solely rely on the database out there.

For example, suppose there is a small town named "Amsterdam" in Australia.

You may want to flag as "Yes" or you want to ignore such a small town.

I think it depends on your preference and the preference should be reflected to your reference table.

Kavya132017
8 - Asteroid

Thank you @Yoshiro_Fujimori  . That's what I'll need to do I guess, creating an exhaustive list.

Kavya132017
8 - Asteroid

Hey @Yoshiro_Fujimori , I have another query. I have multiple excel files with same name format 

Data View 9-5-2023 10-15-48 AM (1), Data View 6-10-2023 10-15-48 AM (1).

 

I want to extract just the date & time stamp from these names. How can I do that?

 

 

Labels
Top Solution Authors