Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to extract country name by phone number

Hi,

Is there any way we could extract and identify the Country Name with the help of there phone number or dialing code?

I have extracted the dialing code from the phone number but unable to get the Country Name.

Any Help would be appreciated.

Thanks.

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi,

Have a look at attached application.

Regards

ASHFAQ

View solution in original post

9 Replies
Yousef_Amarneh
Partner - Creator III
Partner - Creator III

I think you can find country codes database online. I already downloaded one.

Yousef Amarneh
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You will need the ISD mapping table which will tell you which ISD code is for which country, then you can link that with your extracted code field.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
ashfaq_haseeb
Champion III
Champion III

Hi,

Have a look at attached application.

Regards

ASHFAQ

VishalWaghole
Specialist II
Specialist II

Hi,

Just insert this code in you script

if(Match('00'&Left(Phoneno,2),0091),'India','Pakistan') as Country

and also please find attached Qvw.

-- Regards,

Vishal Waghole

Anonymous
Not applicable
Author

Thanks for your reply Yousef.

But then i have to incorporate it into the script as well and i can not as the data model is already a bit cluttered, is there any other work around?

Thanks.

Not applicable
Author

you need to load a dialing code - country mapping table firstly from internet, it's easy to obtain~

Anonymous
Not applicable
Author

Thanks all for the help, it worked.

Anonymous
Not applicable
Author

Sorry for keeping this thread alive, but there is still a problem.


As we have extracted the dialing code from phone number by using the Left(phoneno,2) it will only extract the first two digits but most of the countries have 1 and 3 numbers as there dialing code.


What would be the solution if there is 1, 2 or 3 numbers in the country code.

Please consider we do not have any separator in the phone number or else it would have been done by the help of Subfield.

Thanks.

ashfaq_haseeb
Champion III
Champion III

Hi

Mobile number will be fixed length

You may use that to slice code number.

Regards

ASHFAQ