Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Master II
Master II

what about this:

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

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

Anonymous
Not applicable
Author

This gives me an "Error in expression".

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

tresesco
MVP
MVP

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)