# 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!

Tags (3)
5 Replies
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

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?

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

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)