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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
george55
Partner - Creator III
Partner - Creator III

Data from last week

Hi all,

It is possible to use an expressen / set analysis to range the data as follow:

Last week, beginning Monday till Friday or Sunday. E.g. today is 26 Feb. Need data: 17 - 21 Feb.

Thank for any advice.

Labels (1)
13 Replies
Qlik1_User1
Specialist
Specialist

try this

Aggr(Only({< DATE(timestampField,'MM/DD/YYYY') = {">=$(=WeekStart(Today(), -1))<=$(=Date(WeekStart(Today(), -1) +4))"} >} DATE(timestampField,'MM/DD/YYYY')),DATE(timestampField,'MM/DD/YYYY'))

george55
Partner - Creator III
Partner - Creator III
Author

Still not working. Did changed dateformat and tried:

'MM/DD.YYYY'
'DD.MM.YYYY'
'DD/MM/YYYY'

but nothing was working. Does this have an impact anyway?

The timestampField has this format: 2020-01-03 08:01:44.490000

I believe it is not a formatingproblem, otherwise why e.g. "timestampField", >= WeekStart(Today(), -1)" is working? Looks like Qlik is smart enough to use the numvalue correctly of each date / timestamp.

and when I use this:
=timestampField  = ">= WeekStart(Today(), -1) <= Date(WeekStart(Today(), -1) +4)" got at least no error. But in filter pane I have "0" to select. For my understanding it shold be at least '-1' or -1'

 

Qlik1_User1
Specialist
Specialist

can you share some sample data.

george55
Partner - Creator III
Partner - Creator III
Author

find the solution. You have to do it with an 'AND'. 
Did so much search here in the community and google but did not find something like this, just use a simple AND 😞 !!! 

=timestampField >= (WeekStart(Today(), -2)) AND timestampField<= (Date(WeekStart(Today(), -2) +5))