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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
JoyalV
Contributor
Contributor

How do split/convert data from a cell into specific length data?

Say I have a field called account number and it is  "12398760234535345" but I want to convert it into "123-9876-023" in the script area. How would I do that? 

Data is coming from excel, I would change the edited data to [Account Number] AS Account_Number

 

Labels (3)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master II
Partner - Master II

Hi, with the combination of the Left() and Mid() string functions as below.

Left([Account Number],3)&'-'&Mid([Account Number],4,4)&'-'&Mid([Account Number],8,3) as Account_Number

View solution in original post

2 Replies
BrunPierre
Partner - Master II
Partner - Master II

Hi, with the combination of the Left() and Mid() string functions as below.

Left([Account Number],3)&'-'&Mid([Account Number],4,4)&'-'&Mid([Account Number],8,3) as Account_Number

JoyalV
Contributor
Contributor
Author

Thank you so very much for your help!