Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

How many customers have bought on the last 3 months?

Hi Qlik Sense folks,

I'm new at Qlik world and Im developing a dashboard into Qlik Sense to check how many customers have bought on the last 3 months...

Its a real possibility?

Will be something like this? I'm completely lost

count sales order each month

count(sales order at last month)

this is just to see how many distinct orders i have each month...

but the thing might be to see is month to month what's the amount of money this customers who are not placing orders i'm losing to forecast this lost of sales

Tks

Cheers!

5 Replies
mrkachhiaimp
Not applicable

Re: How many customers have bought on the last 3 months?

=SUM(IF(Aggr(Count({<OrderDate = {">=$(=MonthStart(Today(),-2))<=$(=Today())"}>}Distinct OrderID),Customer)>=1,Customer))

or


=SUM(IF(Aggr(Count({<OrderDate = {">=$(=AddMonths(Today(),-3))<=$(=Today())"}>}Distinct OrderID),Customer)>=1,Customer))

jagan
Not applicable

Re: How many customers have bought on the last 3 months?

Hi,


Try this expression


=Count({<OrderDate = {">=$(=MonthStart(Today(),-2))<=$(=Today())"}>}Distinct CustomerID)


Note : Replace OrderDate with your actual date field and Customer with your actual CustomerID field.

Both OrderDate and Today() are in the same format.


Hope this helps you.


Regards,

Jagan.





Not applicable

Re: How many customers have bought on the last 3 months?

hi @ Manish Kachhia for both i have 0,00

just to clarify some points

i need to replace these fields for my fields at my db, is that correct?

OrderDate = The date of the order

OrderID= The sales order number

Customer=Customer name


thank you!


Cheers!


Not applicable

Re: How many customers have bought on the last 3 months?

hi jagan mohan

I've found the qty. of customers. but I need to check who haven't bought at the last 3 months

chauhans85
Not applicable

Re: How many customers have bought on the last 3 months?

simply apply not eaual( -=) .

see below code

Count({<OrderDate -= {">=$(=MonthStart(Today(),-2))<=$(=Today())"}>}Distinct CustomerID)


and for customer who have purchange in last month


if(Count({<OrderDate = {">=$(=MonthStart(Today(),-2))<=$(=Today())"}>}Distinct OrderID)>0, Count(distinct CutomerID)


and again for not


if(Count({<OrderDate -= {">=$(=MonthStart(Today(),-2))<=$(=Today())"}>}Distinct OrderID)>0, Count(distinct CutomerID)