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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with conditions on fields of date types

Hello,

I want to use the count function using a set analysis expression and with two conditions in it.

This is my expression:

= count({<ORDER_BOOKED_DATE>Today()-7, PROMISE_DATE<Today()+30>}LINE_NUMBER)

ORDER_BOOKED_DATE and PROMISE_DATE are fields of date type. So basically i want to count  orders that have been registered more than a week ago  and with a promised date less than a month.

This does not work. Is there something i'm doing wrong?

Help please!

Thanks.

Tatiana

16 Replies
sunny_talwar

Would you be able to share a sample so that we can check it out? Also, is this AND condition or is it an OR condition?

Not applicable
Author

Hello everybody,

I attached a copy of the data sample.

Tatiana

Not applicable
Author

Hello Sunny,

It is an And condition i wanna use. I just attached a copie of a sample.

Thanks.

Frank_Hartmann
Master II
Master II

to me the expression and the result looks correct.

the only row where the condition (>Today()-7 for ORDER_BOOKED_DATE)

and (<Today()+30 for PROMISED_DATE) is fullfilled is row Nr.4.

So if you make a count on that the result will be 1.

what is your expected result for the count?

Not applicable
Author

Hello franck

Thanks for your response. I am supposed to have 2 as the result of the count(row Nbr 2 and 3) since i want to count the LINE_NUMBER  that have been registered(ORDER_BOOKED_DATE) for more than a week and that have to be delivered(PROMISED_DATE) in less than a month.

Maybe the problem is into the clause of my condition then.

Frank_Hartmann
Master II
Master II

try this expression:

=Count({<ORDER_BOOKED_DATE = {"$(='<' & Date(Today()-7, 'DD/MM/YYYY'))"}, PROMISED_DATE = {"$(='<' & Date(Today()+30, 'DD/MM/YYYY'))"}>}LINE_NUMBER)

Not applicable
Author

It works now! Thank you very much!