Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
aj0031724
Partner - Creator
Partner - Creator

Last 7 days from the Data exists in Table qlikview

Team,

I have a date (mm/dd/yyyy) format  table like below:

tab1:
Load * inline [
date,Value
04/16/2012,100
05/17/2012,100
06/18/2012,100
07/19/2012,100
08/20/2012,100
09/20/2012,100
10/21/2012,100
11/22/2012,100
12/23/2012,200
01/24/2012,500
02/25/2012,400
03/26/2012,300
]
;

What I need is to retrieve last 7 days exists on table data from the date selected.

if user selects 02/25/2012 then last 7 days exists on my data I need to retrieve ie:

07/19/2012,100
08/20/2012,100
09/20/2012,100
10/21/2012,100
11/22/2012,100
12/23/2012,200
01/24/2012,500

I don't want to get last 7 days  from date selected if the dte doe snot exist son my system data in table.

Can you please help me on this?

7 Replies
Qrishna
Master
Master

do you want on the front end or at the script level itself?

aj0031724
Partner - Creator
Partner - Creator
Author

At script level.

Qrishna
Master
Master

oh then you want to use 2 list boxes on the front end for the same field?

aj0031724
Partner - Creator
Partner - Creator
Author

I need to mark each date with some class say "X/Y"" by doing  last 7 days sliding windows calculation based on table data and show the output in straight table .

aj0031724
Partner - Creator
Partner - Creator
Author

Team,

Can you please let me know how to calculate last 7 dates from qlikview table including the date selected on Front end as per above post?

Thanks in advance

Qrishna
Master
Master

Check out the attached,.

Qrishna
Master
Master

Any luck>?