Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

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)
1 Solution

Accepted Solutions
Highlighted
Specialist III
Specialist III

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
Highlighted
Specialist III
Specialist III

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