How to insert a delimiter such as a hyphen (-) into a text string to make it into a phone number

I currently have a dimension that shows a string of numbers as such (e.g. 1234567890), and I want to be able to modify the formatting of that to make it into a phone number so it reads (e.g. 123-456-7890). Any help on this topic would be appreciated!

@manbig : You can create a calculate field to achieve this.

Step -1: Create a calculate field
concat(substring(toString({input}),1,3),‘-’,substring(toString({input}),4,3),‘-’,substring(toString({input}),7,4))

Here the input is your field name

Then you can see the data as expected. It can be created at data set level

Hope this will help you.

Regards - San

2 Likes

Thanks @Sanjeeb2022 worked like a charm!

2 Likes

Thanks @Sanjeeb2022 for helping our community! :slight_smile: @manbig So glad this worked! Thanks for marking the solution!

1 Like