Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Replacing Field Value already loaded

I load data into Fact table from our ERP system and I have a field called Payer.  I then Left Join to Fact data in a spreadsheet that has the fields Payer and Exclude.  The Exclude field will have the value of 'Y' in it.  Now  the Exclude field in Fact will have a 'Y' or it will be Null.

My Question:

After I have done the above (Fact table is now loaded with Payer and Exclude fields, I want to go through a differnet logic process, something like if Payer = X and some other field = Z Change the Exclude field from Y to N.  Is there a way to overwrite the value of a field?

Thanks,

2 Replies
hic
Former Employee
Former Employee

Don't do the join. Instead, start by loading the Payer and Exclude fields from the Excel sheet:

Load

          Payer as ExcludedPayer

          From Excel ...

          Where Exclude = 'Y'.

 

Then load your fact table:

Load <all_other_fields>,

          if( Exists(ExcludedPayer,Payer), // if Payer already exists in the previous table

           if( Payer = 'X' and Field2 = 'Z', 'N', 'Y'),

           'N' ) as Exclude

          From FactTable;

... or some similar logic in the if-function.

HIC

whiteline
Master II
Master II

I think, only if you load them into another table.