Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
linxili10
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..

3 Replies
Frank_Hartmann
Honored Contributor II

Re: How to count customers in data set

what about this:

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

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

linxili10
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
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)