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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

Need Help?

HI Community,

How to calculate last 7 days data... based on selection.

scripting and layout..

PFA,

5 Replies
maxgro
MVP
MVP

sum({$<Year=,Month=,Day=,date={">=$(=date(max(date)-7))<=$(=date(max(date)-0))"}>} cost)

PFA

rubenmarin

Hi Paul, you can flag last 7 dates, adding to the script:

Left Join (Test)

First 7 LOAD date, 1 as _IsLast7Days

Resident Test Order By date desc;

Then you can use this in graph expression:

sum({<_IsLast7Days={1}>} cost)

its_anandrjs
Champion III
Champion III

Hi,

Try to write

sum({<Year={'$(=Max(Year))'}, Day={'>=$(=Max(Day)-7) <=$(=Max(Day)) '}  >} cost)

Regards

Anand

its_anandrjs
Champion III
Champion III

For exactly last 7 days try this

sum({<Year= {'$(=Max(Year))'}, Day={'>$(=Max(Day)-7) <=$(=Max(Day)) '}  >} cost)

Last7Days.png

Regards

Anand

paulwalker
Creator III
Creator III
Author

Hi Anand,

is it possible write in script level..???