Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahran
Contributor II
Contributor II

Subdivide String

Hello,

I have an ID e.g. CG45984G1156GD42R46Z135466
and now I want to subdivide it as follows:
CG45984G-1156-GD42-R46Z135466
So first after 8 characters should be a '-', then after 4 characters a '-' and then again after 4 characters a '-' and then the rest.

Can anyone help me? Thank you

Labels (4)
1 Solution

Accepted Solutions
Or
MVP
MVP

Left(String,8) & '-' & Mid(String,9,4) & '-' etc.

 

View solution in original post

2 Replies
Or
MVP
MVP

Left(String,8) & '-' & Mid(String,9,4) & '-' etc.

 

Mahran
Contributor II
Contributor II
Author

Thank you!