Reputation: 29
I am adding Two tables (Transactions, Customers) to Qlikview and I need a number returned on how many customers have spent over 1000$ in a text object.
I am trying to achive this through aggregate function with no luck till now.Is this possible?or should i try an alternative root.
Num(Count( {$ < Aggr(Sum(Total),Customer) = {">1000"}>} Distinct Customer), '###.###.###')
Total is the amount spent on each transaction and customer the customer who made the transaction.
I also tried something like the below code:
count({<Customer= {"=sum(Total)> =100"} >} distinct Customer)
but still havent gotten anywhere.
Upvotes: 1
Views: 964
Reputation: 1633
If think is what you want to do. Assuming Total is the number you want to add I've used Spend to avoid confusion. This would give you the number of customers with a spend above 1000 based on the current selections.
Num(Count(if(Aggr(Sum(Spend),Customer)>1000,1)), '###.###.###')
The use of the TOTAL function inside the aggr() function will skew the results
Upvotes: 1