Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
rajinikanth
Contributor III
Contributor III

Previous Date flag in script

Hi I have dates as below

When I click on 21 aug 2019 date I need to see 03-sep-2019 data

when I click on 03-sep-2019 I need to see 11-oct-2019 data

Basically I need to create a flag in the script for my previous date like ISprevday =1

I need to do it in the script

Datasales
21-Aug-19100
03-Sep-19200
11-Oct-19300
01-Nov-19400
02-Dec-19500
02-Jan-20600
Labels (1)
  • new

1 Solution

Accepted Solutions
Saravanan_Desingh

Are you looking like this:

tab1:
LOAD *, RecNo() As RowID INLINE [
    Data, sales
    21-Aug-19, 100
    03-Sep-19, 200
    11-Oct-19, 300
    01-Nov-19, 400
    02-Dec-19, 500
    02-Jan-20, 600
];

tab2:
LOAD *, Peek('Data',RowID,'tab1') As NewData
Resident tab1
;

Drop Table tab1;

commQV12.PNG

View solution in original post

1 Reply
Saravanan_Desingh

Are you looking like this:

tab1:
LOAD *, RecNo() As RowID INLINE [
    Data, sales
    21-Aug-19, 100
    03-Sep-19, 200
    11-Oct-19, 300
    01-Nov-19, 400
    02-Dec-19, 500
    02-Jan-20, 600
];

tab2:
LOAD *, Peek('Data',RowID,'tab1') As NewData
Resident tab1
;

Drop Table tab1;

commQV12.PNG