Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

Count current month

Hiya

in my sql data load I have Order_Date in the following format

20140101 00:00:00

this contains data for 3 years.

I have in my data load done this

Month(Order_Date) as Month

my expression is

count({$< Month ={$(=Month(today()))}  >}Customer_ID)

but it is counting every order date month that contains October, I just want count for Oct 2015

if I do this

count({$< Month ={$(=MonthStart(today()))}  >}Customer_ID)

I get -

Please Help

1 Solution

Accepted Solutions
sunny_talwar

Try this may be:

Date(Order_Date) as Order_Date

Expression:

=Count({<Order_Date = {"$(='>=' & Date(MonthStart(Today())) & '<=' & Date(MonthEnd(Today())))"}>} Customer_ID)

View solution in original post

4 Replies
sunny_talwar

Try this may be:

Date(Order_Date) as Order_Date

Expression:

=Count({<Order_Date = {"$(='>=' & Date(MonthStart(Today())) & '<=' & Date(MonthEnd(Today())))"}>} Customer_ID)

joeybird
Creator III
Creator III
Author

Awsome

thank you Sunny x

Kind Regards

ZoeM
Specialist
Specialist

Hey Sunny,

I have a similar issue. My expression is:

=Date(Today(),'MMM')& ', '& Count({$<[Date Type]={'VPP Dates'},YearMonth={$(=Date(Today(),'MMM'))} >}Gateways)

Expression is OK, but my result is zero.

I am trying to specify a data point for total sales for current month (November in this case).

alsahly2017
Contributor III
Contributor III

Thanks @sunny_talwar ,

It works perfectly.