Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

selection for last week

Hi experts

I have the following statement giving me entries of the last month:

LOAD *, stunden_1w*stdsatz_alt1W as X_1w;

Load

jobnr,

    stunden as stunden_1w,

    stdsatz_alt as stdsatz_alt1W

resident Stunden where datum > Date(AddMonths(Today(),-1));

How can I get only values from last weeg?

Best

Jan

1 Solution

Accepted Solutions
yduval75
Partner - Creator III
Partner - Creator III

LOAD *, stunden_1w*stdsatz_alt1W as X_1w;

Load

jobnr,

    stunden as stunden_1w,

    stdsatz_alt as stdsatz_alt1W

resident Stunden where datum > Weekstart(Today(),-1);

View solution in original post

6 Replies
yduval75
Partner - Creator III
Partner - Creator III

LOAD *, stunden_1w*stdsatz_alt1W as X_1w;

Load

jobnr,

    stunden as stunden_1w,

    stdsatz_alt as stdsatz_alt1W

resident Stunden where datum > Weekstart(Today(),-1);

mato32188
Specialist
Specialist

Hi Jan,

where week(datum) = week(today())-1

BR

M

ECG line chart is the most important visualization in your life.
tresesco
MVP
MVP

Or, (if you want only last week data)

resident Stunden where datum >= Weekstart(Today(),-1) and datum <Weekstart(Today());

Edit: corrected

yduval75
Partner - Creator III
Partner - Creator III

Indeed, but I think there is perhaps a mistake in your syntax


resident Stunden where datum >= Weekstart(Today(),-1) and datum < Weekstart(Today());

tresesco
MVP
MVP

Like this, year check will fail.

mato32188
Specialist
Specialist

Sorry man, of course, you are right...

ECG line chart is the most important visualization in your life.