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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

count if date >= AND <= than value

Hey folks,

I have a question concerning dates.

I have the following table: two dimensions (type and shop)

Knipsel.JPG

"Amount" shows the amount of deliveries/pick up's. You find the value "amount" with the following expression:

=(Count({$<Ordernr={'40*', '9*'}>}DISTINCT Ordernr))

Ordernr is the code a delivery/pick up gets. So it just counts the number of codes starting with 40* or 9* (pick up and delivery).

BUT: I now need the amount of deliveries/pick up's for a specific month. The date can be found in the dimension "date" (DD/MM/YYYY)

How can I tell Qlikview which month it needs to take into consideration?

something like

if( date >= 01/04/2013 AND <=30/04/2013, Count({$<Ordernr={'40*', '9*'}>}DISTINCT Ordernr)))

But it does not show me any values..

So I should be able to count the amount of orders in a specific month. The "date" can not be selected as a value, cus I need to be able to count it for different months in different expressions.

Who can help me please?

Thanks alot!

Zipke

10 Replies
Not applicable
Author

Hey Sokkorn, I am using your expression.

Just one question, it should not happen, it was by mistake, but I get values when I enter:

Count({$<Ordernr={'40*', '60*', '70*', '9*'}, Date = {">=01/03/2013<=31/01/2013"}>} DISTINCT Ordernr)

How is that possible?

Is there AND, or OR between the dates? I cannot figure out why it counts that much values.

Is it only showing me the values that equal 01/03/2013 +  the values that equal 31/01/2013, is this how I should interprete this mistake?

Cheers