Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
qliklearnervir
New Contributor III

filter for weekend and week start in qlikview scripting

Hi,

I have a requirement where i want to filter the data according to below condition:-

(1) we want to show the data according to extract date like this week Tuesday (19/01/2016) than in our filter condition we have to pick the data from this week Friday to next week start Monday.

how to design the filter kindly help.

fields to pick :   Name,Address ,Extract Date , Filter date

Extract Date : is Tuesday

Filter date : Friday to Monday ( Next Week Start)

Kindly suggest.

1 Reply
MVP
MVP

Re: filter for weekend and week start in qlikview scripting

Maybe using something along these lines:

Set DateFormat = 'DD/MM/YYYY';

Let vExtractDate = num('19/01/2016');

Let vFilterStart = floor(WeekEnd( vExtractDate)-2);

Let vFilterEnd = floor(WeekEnd( vExtractDate)+1);

LOAD

       Name,

       Address,

      [Extract Date],

      [Filter Date]

FROM ....

WHERE [Extract Date] = $(vExtractDate) AND [Filter Date] >= $(vFilterStart) AND [Filter Date] <= $(vFilterEnd);

Community Browser