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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
MuraliPrasath
Creator III
Creator III

How to add space between text value?

Hi Qlik,

I need to add space between the text value before the numbers. so that I can search the number without * in the field.

Need help with this. Thanks!

example (employee name with a number)  field value: 

Almnz-Michli, LeelIvan-88779

Expected field value:

Almnz-Michli, LeelIvan- 88779

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

I assume you have some kind of pattern in your string.

My best guess by looking at your example is that the number comes after the last  '-' sign. If that is the case then you can do like this.

Mid(Textfield, 1, index(Textfield,'-',-1)) & ' ' & subfield (Textfield, '-', -1)

View solution in original post

4 Replies
Vegar
MVP
MVP

I assume you have some kind of pattern in your string.

My best guess by looking at your example is that the number comes after the last  '-' sign. If that is the case then you can do like this.

Mid(Textfield, 1, index(Textfield,'-',-1)) & ' ' & subfield (Textfield, '-', -1)

MuraliPrasath
Creator III
Creator III
Author

Thank you Vegar 🙂

MuraliPrasath
Creator III
Creator III
Author

Hi Vegar,

I got the space after the '-' now. How to get the space before the '-' also like below.

Example:  Almnz-Michli, LeelIvan - 88779

Vegar
MVP
MVP

You could try this:

=Mid(Textfield, 1, index(Textfield,'-',-1)-2) & ' - ' & subfield (Textfield, '-', -1)