Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
KirstenKa
Creator II
Creator II

Vlookup and create new value

I am currently joining 2 datatables

C8:

LOAD

    " C8.sku"                       as %ItemColor_Tradingcode,

    " C8.sku"  as            ItemColor_Tradingcode,

Left Join( C8 )

SAP:

LOAD

   " SAP.Trading Co"                       as %ItemColor_Tradingcode,     

    " SAP.Trading Co"                      as ItemColor_ Tradingcode _SAP,

After that I would like to do a v-lookup to see if the value in SAP.Trading Co exists compared to C8.sku

If it doesn’t exist similar to yellow marked (Cell A2) I would like to mark the c8.sku as “not ready” in the following code in the load script

  If(num#([MovAv.4200],'#,00')<>0 AND num#("LSRP-4000",'#,00')<>0 AND trim([MovAv.4200]) & ''<>'' AND ("LSRP-4000")<>0 AND ([MovAv.4200])<>0 AND len(trim(Theme))*len(trim(MovAv.4200))*len(trim("CoO(Purcha"))*len(trim("LSRP-4000")), 'Ready', 'Not ready')  as SAPSFMSstatusSalesorder

 

Though the code above exists in the SAP upload table script and C8.sku exists in another upload script C8. How to adjust this code in the script?

KirstenKa_0-1692015369439.png

 

 

 

 

 

 

 

 

 

Labels (1)
5 Replies
Or
MVP
MVP

Try using Mapping Load instead of a left join. ApplyMap() will let you designate the result when no matching value is found.

KirstenKa
Creator II
Creator II
Author

Thanks @Or the mapping load doesn't work in the script, probably a small thing

KirstenKa_1-1692025646658.png

 

KirstenKa_0-1692025541768.png

 

 

 

Or
MVP
MVP

That's not the correct syntax.

Map:

Mapping Load "Item ID", Article From SomeTable;

Load *, ApplyMap('Map',"Item ID",'Others') as Description;

Would fetch the Article for a given Item ID from the mapping load. Mapping loads should only have two fields.

 

KirstenKa
Creator II
Creator II
Author

Sorry I did not see you added a link, I go try based on the description

KirstenKa
Creator II
Creator II
Author

@Or I worked on the code. And I get the following error

KirstenKa_0-1692821337221.png

This is my code  and attached a description of the values of the code. What goes wrong?

KirstenKa_1-1692821362240.png