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: 
canmarroig
Partner - Creator
Partner - Creator

Wildmatch function in if condition

I've to create a list box, changing text into number: if(WildMatch([code_nr],'PRB*'),'00',[code_nr])

i'd like to clean: PRB09090900 into 0009090900. Where's my mistake?

Tks

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be this:

Num(Replace(code_nr, 'PBR', '00'), '##')


Num#(Replace(code_nr, 'PBR', '00'), '##')

View solution in original post

7 Replies
sunny_talwar
MVP
MVP

May be this:

Num(Replace(code_nr, 'PBR', '00'), '##')


Num#(Replace(code_nr, 'PBR', '00'), '##')

tresB
Champion III
Champion III

Try like:

Replace([code_nr],'PRB','00')

Kushal_Chawda
MVP
MVP

Another way

00 & purgechar([code_nr],'PRB')

canmarroig
Partner - Creator
Partner - Creator
Author

This function change my field but add 00 before every occurrency in my dimension

canmarroig
Partner - Creator
Partner - Creator
Author

Tks!!

canmarroig
Partner - Creator
Partner - Creator
Author

and if I need to change all my string, cointaining a prefix, not only a part of it

PRB09090900

PRB08776766

into 00

Num#(Replace(code_nr, 'PBR*', '00'), '##') is not correct


sunny_talwar
MVP
MVP

Then I would use WildMatch()

If(WildMatch(code_nr, 'PBR*'), '00', code_nr)