Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
I have to write an incremental logic based on ID and flag.
I am using date>modified date and for update using not exist (ID), but how to use flag along with that as flag is also getting update as Y or N based on update data.
How can I use this?
Thanks
Hi,
it would be helpful if you share some dummy data to understand your requirement better.
thanks
For example below is the data set:-
ID | a | b | Key | Sales | Flag |
1 | 4 | 5 | 9 | 4_5_9 | Y |
2 | 3 | 6 | 8 | 3_6_8 | Y |
3 | 25 | 7 | 7 | 25_7_7 | Y |
here ID field is incremental, now next day another record is being added, with a flag value as N, and first row of data is updated:-
ID | a | b | Key | Sales | Flag |
1 | 4 | 5 | 9 | 4_5_9 | Y |
2 | 3 | 6 | 8 | 3_6_8 | Y |
3 | 25 | 7 | 7 | 25_7_7 | Y |
4 | 4 | 5 | 9 | 4_5_9 | N |
so to update the data in qlik, I will write where not exist(Key), but without flag it will not recognize that ID number'4' is a new records, so I have to include flag logic as well, because records are being updated based on that.
If I understood right, for each record if the Flag is 'N' its a new record, 'Y' is old. If this is correct, i would do the following:
Hope this helps
Thanks