# New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
New Contributor II

## How to count customers in data set

I made an expression to compare customers transaction from one month to another:

=if((sum([TransactionAmount]) < 3000)and

(sum(aggr(rangesum(above(total sum({<TransactionMonth=>}TransactionAmount),1,1)),AccountNo,TransactionPeriod))>=3000),1,0)

Now I want to count all the  customers, who fullfill this requirement; all the customers that receives a 1 from the expression. How do I solve that? I haven't been able to solve this without getting errors in expression..

Tags (2)
3 Replies
Honored Contributor II

## Re: How to count customers in data set

=sum(if((sum([TransactionAmount]) < 3000)and

(sum(aggr(rangesum(above(total sum({<TransactionMonth=>}TransactionAmount),1,1)),AccountNo,TransactionPeriod))>=3000),1,0))

New Contributor II

## Re: How to count customers in data set

This gives me an "Error in expression".

Maybe I need to alter the original expression, to make it work? Any hot tips? MVP

## Re: How to count customers in data set

May be this?

Count(Aggr(

If(sum([TransactionAmount]) < 3000)and

(sum(aggr(rangesum(above(total sum({<TransactionMonth=>}TransactionAmount),1,1)),AccountNo,TransactionPeriod))>=3000), Customer), Customer)