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

exclude current month

Hiya

have a kpi

I am trying to write something like this

sum({$< Order_Date -={$(Month(getdate()))}  >}Customer_ID)

I wish to exclude this months 'October 2015'  (When this post was written)  orders for customers

where am I going wrong

please help

13 Replies
Not applicable

count({$< [Order_Date.Calendar.Month] ={$(=Month(AddMonths(today(),-1)))}  >}Customer_ID)

AddMonths(today(),-1) will give you last month.

caution though - the Month function will take out the Year portion - so if you have more than a years worth of data, it will look at multiple Septembers....

joeybird
Creator III
Creator III
Author

Hiya

this still returns the value of 0

I try this, but it does not seem to minus order dates for this month

COUNT({$< Order_Date -= {$(=Month(today()))}>}Customer_ID)

what can be wrong?

please help

Not applicable

hello

does:

COUNT({$< Order_Date <= {$(=AddMonths(MonthEnd(today()),-1))}>}Customer_ID)


work?

joeybird
Creator III
Creator III
Author


Brill, thanks again, it worked x

Kind Regards