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

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

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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

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