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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rsdhavle
Creator III
Creator III

Adding characters for specific count

I have a client field which has multiple value. The requirement is I need to add '*' character in the middle as in need to mask those value.

So lets say my client name is  ABCDE I need to show it as A***E.  I need to insert 3 '*' here

If I have calculated count where I need to insert * values based on the requirement how can I insert those number of * characters in client name value for different counts like 3,4,5,6 etc

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

If you want to always keep the first and last letters and replace rest, try like:

=Left(<YourString>, 1) & Repeat('*', <count>) & Right(<YourString>, 1)

View solution in original post

1 Reply
tresB
Champion III
Champion III

If you want to always keep the first and last letters and replace rest, try like:

=Left(<YourString>, 1) & Repeat('*', <count>) & Right(<YourString>, 1)