Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
publication1
Contributor III
Contributor III

Count X where Date is greater than Y

Thanks for your time, 
I'm trying a very simple COUNT of "Item Name" where Delivery Date > 04/12/2018
 
Datatype for this field is DATE
Data script editor is set up as SET DateFormat='DD/MM/YYYY';
 
*** FAILED ATTEMPTS ***
COUNT({$<DELIVERY_DATE = {">04/12/2018"}>} ITEM_NAME)
COUNT({$<DELIVERY_DATE = {">04/12/2018"}>} ITEM_NAME)
COUNT({$<DELIVERY_DATE = {">'04/12/2018'"} >}ITEM_NAME)
COUNT({$<DELIVERY_DATE = {">'04/12/2018'"}>}[ITEM_NAME])
COUNT({$<DELIVERY_DATE = {">04/12/2018"}>}[ITEM_NAME])
COUNT({$<DELIVERY_DATE = {'>04/12/2018'}>}[ITEM_NAME])
Labels (4)
1 Solution

Accepted Solutions
MayilVahanan

Hi @publication1 

Try like below

COUNT({$<DELIVERY_DATE = {">04-dec-2018"}>} ITEM_NAME) 

Assigning values must be equal to ur date format (DD-mmm-YYYY) or (DD-MMM-YYYY).

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

View solution in original post

4 Replies
MayilVahanan

Hi @publication1 

Even though Data type is Date , what is the date format in db?? You can create a list box with delivery date as field and find ur date format and use those date format in set analysis.

Or, you can try like this

Load Date(Delivery_Date) as Delivery_Date from urSourcetable;

After that, you can try in front end like

COUNT({$<DELIVERY_DATE = {">04/12/2018"}>} ITEM_NAME) 

Hope it helps

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

Thank you for your time. 

My source database table shows it as 04-dec-2018

I have changed my script editor in QLIK to SET DateFormat='DD-MMM-YYYY'; however this still does not work.

Any help will be amazing

Chanty4u
MVP
MVP

Looks like issue not with expression.. some where you are doing mistake .

What is your actual date format ? 

What is the error your facing ?

Is data available for greater than this date?

Could you please share some sample data to test the same ?

MayilVahanan

Hi @publication1 

Try like below

COUNT({$<DELIVERY_DATE = {">04-dec-2018"}>} ITEM_NAME) 

Assigning values must be equal to ur date format (DD-mmm-YYYY) or (DD-MMM-YYYY).

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