Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklearnervir
Creator
Creator

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
swuehl
MVP
MVP

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);