cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SharonHMA Regular Visitor
Regular Visitor

formatting telephone numbers to add dash

Hello,

 

I have a query that brings in phone data consistently as 10 digits, eg:  5558884444 (currently set as text field)

 

To import this to another program I need it formated as

555-888-4444

 

 

Anyone help in how to format appreciated.

 

Thank you

Sharon

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator Eric_Zhang
Moderator

Re: formatting telephone numbers to add dash


@SharonHMA wrote:

Hello,

 

I have a query that brings in phone data consistently as 10 digits, eg:  5558884444 (currently set as text field)

 

To import this to another program I need it formated as

555-888-4444

 

 

Anyone help in how to format appreciated.

 

Thank you

Sharon


@SharonHMA

Two approaches FYI.

1. In Power Query, split that one column into 3 and add a new custom column

Capture.PNG

 

.

 

2. In DAX. Change that column to decimal type and use FORMAT(TABLE[PHONENO],"###-###-####")

Capture2.PNG

2 REPLIES 2
Moderator Eric_Zhang
Moderator

Re: formatting telephone numbers to add dash


@SharonHMA wrote:

Hello,

 

I have a query that brings in phone data consistently as 10 digits, eg:  5558884444 (currently set as text field)

 

To import this to another program I need it formated as

555-888-4444

 

 

Anyone help in how to format appreciated.

 

Thank you

Sharon


@SharonHMA

Two approaches FYI.

1. In Power Query, split that one column into 3 and add a new custom column

Capture.PNG

 

.

 

2. In DAX. Change that column to decimal type and use FORMAT(TABLE[PHONENO],"###-###-####")

Capture2.PNG

SharonHMA Regular Visitor
Regular Visitor

Re: formatting telephone numbers to add dash

Awesome thank you @Eric_Zhang.  I had to use option 1 since some phone fields are empty & I was getting errors. 

Sharon

 

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 108 members 1,545 guests
Please welcome our newest community members: