# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Not applicable

## customer count, new,lost, total

I have the following logic to calculate

Lost Customer - hasn't bought anything the last two years

New Customer - bought something this year, but nothing the last two years

Total Customers - everyone who has bought something this year

i have attached my model to this post.

i worked out how to calculate New Customer , however am really battling with the other two lost customer and Total customer.

any help is greatly appreciated.

Best,

Tags (3)
1 Solution

Accepted Solutions
Highlighted
MVP & Luminary

## Re: customer count, new,lost, total

Hi,

Please find attached file for solution.  Calculated Total and Lost customer in script.

Hope this helps you.

Regards,

Jagan.

4 Replies
Highlighted
Contributor

## Re: customer count, new,lost, total

Try this  =if(Count(Year(Year) = 2013),sum(amt))  I hope it helps!

Highlighted
MVP & Luminary

## Re: customer count, new,lost, total

Hi,

Please find attached file for solution.  Calculated Total and Lost customer in script.

Hope this helps you.

Regards,

Jagan.

Highlighted
Not applicable

## Re: customer count, new,lost, total

Total Customers can be done by :

Count(DISTINCT {<Year={2013}>} customer)

Highlighted
Not applicable

## Re: customer count, new,lost, total

Hi,

New customer can be done by :

= count({<Year=-{2012,2011}>} distinct customer)

Total customer :

= count  (distinct customer)

Lost customer:

= count({<Year=-{2012,2013}>} distinct customer)