Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Below is the current structure of my data and i would like that to be changes into the structure that is posted below.
Date | Recnumber | To Status | From Status |
12/1/2010 | 1 | Valid | InValid |
12/2/2010 | 1 | Invalid | Valid |
12/3/2010 | 1 | Valid | Invalid |
12/3/2010 | 1 | Invalid | Valid |
12/1/2010 | 2 | Valid | Valid |
12/1/2010 | 3 | Valid | Invalid |
I would like this to be changed into linear data in qlikview but not sure where to start.
Date | Recnumber | Status |
12/1/2010 | 1 | Valid |
12/1/2010 | 1 | InValid |
12/2/2010 | 1 | Invalid |
12/2/2010 | 1 | Valid |
12/3/2010 | 1 | Valid |
12/3/2010 | 1 | Invalid |
12/3/2010 | 1 | Invalid |
12/3/2010 | 1 | Valid |
12/1/2010 | 2 | Valid |
12/1/2010 | 3 | Valid |
12/1/2010 | 3 | Invalid |
Then use a flag instead
temp:
load *,if(peek('ID')<>ID,'1') as flag resident [DAILY TABLE] order by ID,recnum desc;
[MAX TABLE]:noconcatenate load DATE,recnum,STATUS,ID,STATUS_BHANGE resident temp where flag='1';
drop table temp;