Discussion Board for collaboration on QlikView Scripting.
I have a Loader Script as such:
Load ID, CUSTOMER_NAME, REGION
Load ID, PRODUCT
Which creates the FIELDS ID,CUSTOMER_NAME, REGION and PRODUCT for each ID (So joins the tables)
then I import an excel spreadsheet as:
Load ID, REGION
(ooxml, embedded labels, table is Sheet1)
Excel_1 table has updated REGION codes for select IDs. So I want to be able to do something like this in SQL but in Qlikview:
Case when Excel_1.ID = Table_1.ID then Excel_1.REGION else Table_1.REGION end as REGION.
Is this possible?
load * inline [
LOAD *, if(IsNull(new_REGION), REGION, new_REGION) as Final_Region
DROP Table Table_1;
Here is the output:
You can drop the REGION and new_REGION field.
View solution in original post
There are multiple ways of doing this, here is one of them-
Left join Excel_1 to Table_1 on ID, rename field REGION to something like New_REGION and then resident the final output table.
Add another field as if(IsNull(new_REGION), REGION, new_REGION) as Final_Region.
Check this out
Apologies, I am on corporate computer which doesn't allow downloading files.
Would it be possible to paste the code?
Thanks for your patience and help.