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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis

Hi all,

Table 1:

id  orderdate       sales     year

1  01/02/2001        100     2001

2  01/02/2002         200     2002

3  01/02/2003        300       2003

4  01/02/2004        400       2004

Now i want load only "01/02/2003" below data.

I want write this filter condition in set analysis  expression and filter must be a variable.

Regards

Suresh

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

=sum({$<OrderDate={"<=$(datefilter)"}>} Sales)

View solution in original post

6 Replies
rustyfishbones
Master II
Master II

so add a WHERE statement at the end

Table 1:

id  orderdate       sales     year

1  01/02/2001        100     2001

2  01/02/2002         200     2002

3  01/02/2003        300       2003

4  01/02/2004        400       2004

WHERE orderdate = '01/02/2003';

israrkhan
Specialist II
Specialist II

try below in set analysis:

sum({1<orderdate = {">= 01/02/2003 "}>} sales)

Not applicable
Author

Thank you for your reply,

ex: let vdatefilter=makedate(2003,02,01);

then use this variable in SetAnalysis as a filter

I want write filter condition in SetAnalysis and filter must be a variable

Regards

Suresh

MayilVahanan
MVP
MVP

HI

Try like this

Now i want load only "01/02/2003" below data:


= sum({1<orderdate = {"<01/02/2003"}>} sales)

Edit:

PFA

Note:

If you need to load only data upto "01/02/2003", then you can go with Allan

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Why SET Analysis? the solution from Alan Ferrel is correct!!! and more sample!!

Not applicable
Author

=sum({$<OrderDate={"<=$(datefilter)"}>} Sales)