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

Renaming Multiple Records by Single Name

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

1 Solution

Accepted Solutions
PrashantSangle

Hi,

Then write nested if else

Try like

if(WildMatch(CoreProduct,'*200*'),200,if(Wildmatch(CoreProduct,'*500*'),500,CoreProduct)) as CoreProduct,


Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

10 Replies
SunilChauhan
Champion
Champion

if(wildmatch(fieldname),'*200*',200,fieldname) as new fieldname

hope this helps

Sunil Chauhan
Not applicable
Author

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?

PrashantSangle

Hi,

Check the syntax you have written it is wrong

Try this

if(WildMatch(CoreProduct,'*200*',200), CoreProduct) as CoreProduct,


Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

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.

PrashantSangle

Hi,

Sorry my bad

I had written wrong if

Try this

if(WildMatch(CoreProduct,'*200*'),200,CoreProduct) as CoreProduct,


Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

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!

Not applicable
Author

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" 

PrashantSangle

Hi,

Then write nested if else

Try like

if(WildMatch(CoreProduct,'*200*'),200,if(Wildmatch(CoreProduct,'*500*'),500,CoreProduct)) as CoreProduct,


Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PrashantSangle

Hi,

Close thread if you get correct answer.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂