Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Phone Number formatting

Hello!

It seems to be simple issue, but I was not able to find the answer myself, so I would need an expert advice from the forum members:

1. I have a US phone numbers field in the Table Box where the data is stored in simple numeric format: 2223334444

2. I would need it to be presented in the standard way: (222) 333-4444 or +1 (222) 333-4444, but I was not able to find the proper format in the "Number" tab of the TB Properties.

I would appreciate an advice.

Regards,

VK

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You cannot do that kind of formatting in a TableBox. You have to do the formatting in either the script or a Straight Table chart using an expression like:

'(' & left(RawPhone,3) & ')' & mid(RawPhone,4,3) & '-' & mid(RawPhone, 7)

See the attached for an example of both methods.

-Rob

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You cannot do that kind of formatting in a TableBox. You have to do the formatting in either the script or a Straight Table chart using an expression like:

'(' & left(RawPhone,3) & ')' & mid(RawPhone,4,3) & '-' & mid(RawPhone, 7)

See the attached for an example of both methods.

-Rob

Miguel_Angel_Baeyens

Unless someone provides new and more useful information about this, I'm afraid you should create your own format with string functions like

'+1 (' & Left(PhoneField, 3) & ') ' & Mid(PhoneField, 4, 3) & '-' & Right(PhoneField, 4) AS PhoneField
in your load script or something similar anywhere in your graphs, as a phone number is not really a number (you don't add or substract one from another)

Not applicable
Author

Thank you, Rob and Miguel, it works perfectly!

Regards,

VK

swathid1
Contributor
Contributor

Hi,

I am new to Qlik and finding it hard to follow formatting and unable to access PhoneFormat.qvw from Qlik Online. Could you please explain. 

My data has phone #as follow:

030-0074321

(5) 555-4729

(171) 555-7788

0921-12 34 65

88.60.15.31

0621-08460 

....

Regards,

Swathi