Skip to main content
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
Showing results for 
Search instead for 
Did you mean: 

Insert symbol into string every x character?

I'm pretty new to Qlik Sense and just figuring things out. Would take this question to my mentor but he's been sidelined by a massive project, so I'm on my own for the time being.

What I'm dealing with is an app which loads numerous CSV's. Each of these has a computer MAC address field which is listed in the format AABBCCDDEEFF from the CSV source. What I'm wanting to do is to insert a "-" every 2 characters in order to make the MAC's display as AA-BB-CC-DD-EE-FF. More than looking nicer, this will let them interface with our backend DHCP system. 

It does't matter if this happens at the data load phase or if I'm completely missing a way to make the front end do this for me in the tables. Just so long as I end up with a table that is correctly hyphenated for the MAC field. 

Thank you ahead of time for any help with this. I greatly appreciate the assist. 

Labels (1)
  • SaaS

3 Replies

HI @DevonB1 

May be try like below

Load *, Left(MAC,2)&'-'&Mid(MAC,3,2)&'-'&Mid(MAC,5,2)&'-'&Mid(MAC,7,2)&'-'&Mid(MAC,9,2)&'-'&Right(MAC,2) as MAC1 Inline

MAC1 satisfy ur requirement

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

I just answered this one a few days ago... this looks like a direct copy of that question, just from a different user...


Partner - Contributor III
Partner - Contributor III

any way to make this dynamic?