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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date comparison in set expression to get count

Hi,

I have date field in the script and am comparing Order date= today() in the set expression to get number of orders received today, I used below formula but it is not giving anything.

= COUNT({<Date([Order Date],'DD/MM/YYYY') = {">=$(=Today()"}>}[Order Date])

and once I done this I will have to implement orders received this week and orders received in this month as well, pls let me know what is wrong in my formula.

Thanks,

12 Replies
Not applicable
Author

Thanks Sunny this is working fine for me.

=Count({<[Order Date] = {">=$(=Date(Today()))"}>} [Order Date])

now I am in the process of comparing past 1 week and I used below one and it worked

=Count({<[Document Date] = {"<=$(=Date(Today()))>=$(=Date(Today()-7,'DD/MM/YYYY'))"}>} [Document Date])

Not applicable
Author

Hi,

I am creating few formula's this week assuming starts from Sunday and current month in the set expression,

below are the formula which I have written but its not working as expected. I am not using any variables in the expression.

This Month: =COUNT({$<OrderYr = {$(=Year(Today()))}>,<OrderMth={$(=Month(Today()))}>}Distinct Customers)

This week: =Count({<[Order Date] = {"<=$(=Date(Today()))>=$(=Date(Today()-7,'DD/MM/YYYY'))"}>} [Order Date])

Can anyone pls correct the formulas.

Thanks,

sunny_talwar

It would be much easier if you are able to share a sample with the output you are expecting.