Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results 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
Master II

=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?

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)

Community Browser