Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add Assigned Value to Null Value Records

Hello,

I have a table "Contact" which I created in Transformation layer, include data fields "Company_ID",  "Company_Name", "Country_ID", "Country_Name". Some records start with character "Work" in this table don't have "Country_ID" and "Country_Name" originally. Here the example I attached only for presenting.

   

Company_IDCompany_NameCountry_IDCountry
10001WorkShop
10002CompanyB10France
10003CompanyC20Italy
10004CompanyD30China
10005CompanyE40Japan
10006WorkStation

However, I want to give a "Country_ID" -- ("50")  and a "Country_Name" -- ("Gemany") value to these records start with character "Work". Therefore, I added the code as below, but it doesn't work.

Load
Company_ID,
Company_Name,
if (WildMatch(Company_Name,'Work*')=1, Country_ID ='50',Country_ID) as Country_ID,
if (WildMatch(Company_Name,'Work*')=1, Country ='Germany',Country) as Country

From ...

I also tried to use the code below, but it doesn't work as well.

if (Company_Name = 'Work*,Country ='Germany',Country) as Country

Can you please take a look my case and let me know what I can do here to get the ideal result?

Thanks so much,

Becky

10 Replies
ramoncova06
Specialist III
Specialist III

glad it worked