Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Lobo77
Contributor III
Contributor III

Counting orders created before today.

 

Hi all, hoping you can help. Looking to count orders that have been created before today,s date.  I do need it a s a set analysis. I do not have access to load script or creating a variable. I know there should be a a simple solution , but cant seem to get anything but "0" as a result with the solutions below.

The two fields I have are 'order_id' , and 'Order Creation date'. 

The format of the creation date is as dd-mm-yyyy. 

Have tried many of the solutions from other posts with similar questions, and only ever get '0' , when we have many orders 

Thanks in advance

 

Count({<[Order Creation Date]= {"=Order Creation Date >= Now()"}>} distinct [ORDER_ID])

Count({$<[Order Creation Date] = {">=$(=Date(Today(), 'DD-MM-YYYY'))"}>} distinct [ORDER_ID])

Count({$<[Order Creation Date] = {">=$(=(Now()))"}>} ORDER_ID)

Count({$<[Order Creation Date]={"=Date(Floor[Order Creation Date]) >= Today()"}>}[ORDER_ID])
Count({$<[Order Creation Date] = {">=$(=Date(Today(),'DD-MM-YYYY'))"}>} [ORDER_ID])

2 Replies
Yousef_Amarneh
Partner - Creator III
Partner - Creator III

try the below

Count({$<[Order Creation Date] = {">=$(=Num(Date(Today(),'DD-MM-YYYY')))"}>} [ORDER_ID])

Yousef Amarneh
Lobo77
Contributor III
Contributor III
Author

Thanks Yousef for the suggestion.

Unfortunately  getting same result , "0".

 

Its seems odd , if I do an simple if statement , it works , but I cant use an if  statement in this situation.

Thanks again