Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have Product Records with different names that I want to rename the same thing. For example, "S200" ",S200" "200SQL" -- I want all to be named "200" -- is there some kind of 'contains' function in Qlik that allows you to rename records?
Rename Record(Contains '200') as 200
How is this done in Qlik?
Thanks!
David
Hi,
Then write nested if else
Try like
if(WildMatch(CoreProduct,'*200*'),200,if(Wildmatch(CoreProduct,'*500*'),500,CoreProduct)) as CoreProduct,
Regards
if(wildmatch(fieldname),'*200*',200,fieldname) as new fieldname
hope this helps
Thanks for the reply!!
I tried this and the CoreProduct field was blank...
LOAD Company,
if(WildMatch(CoreProduct = '*200*',200), CoreProduct) as CoreProduct,
// CoreProduct,
[Sage Version],
[# of Users]
FROM
Thoughts?
Hi,
Check the syntax you have written it is wrong
Try this
if(WildMatch(CoreProduct,'*200*',200), CoreProduct) as CoreProduct,
Regards
Thanks, Max. I tried that first. It comes back with no errors, but there is no additional '200' record and all of the product names are the same.
Hi,
Sorry my bad
I had written wrong if
Try this
if(WildMatch(CoreProduct,'*200*'),200,CoreProduct) as CoreProduct,
Regards
If you know which value it will ALWAYS take.
Just write in the load:
YourValue AS ThatField
For example:
LOAD Company,
200 as CoreProduct,
[Sage Version],
[# of Users]
FROM
-------------------------------
Good luck!
Thanks All. Max -- your script worked -- thanks!
End game, however -- is to have 3 record names -- it seems that this version of wildmatch is only for one record name.
Now we can define that ,200 and 200 are named "200". What if I want to say ,200 and 200 are "200" AND ,500 and 500 are "500"
Hi,
Then write nested if else
Try like
if(WildMatch(CoreProduct,'*200*'),200,if(Wildmatch(CoreProduct,'*500*'),500,CoreProduct)) as CoreProduct,
Regards
Hi,
Close thread if you get correct answer.
Regards