Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help: Counting customers who's monthly totals exceed some thresholds

Hi guys,

Need your help badly. Would you please suggest me a solution to the following problem:

I have a certain number of customers (CUST#), for each customer I have pre-aggregated transactions (a customer may have several records for any month).

CUST#MONTHTRANS.VALUETRANS.QTYTRANS.VALUE*QTY
99Feb.1025125

I need to get (for each month) the number of customers that have total transactions' value >= 100 and those that have less than 100 (<100).

Like this (the figures are wrong, just to show the template):

MONTH<100>=100
Jan.1023
Feb.1053
Mar.10
9
Apr.1047
May.1032
Jun.1038
Jul.1025
Aug.10110
Sep.1043
Oct.1027
Nov.1032
Dec.10115

Thanks a lot in advance.

Dmitry

Here is the sample:

CUST#MONTHTRANS.VALUETRANS.QTYTRANS.VALUE*QTY
99Feb.1025125
99Sep.1050150
99Sep.1050150
99Oct.10254100
99Jun.10502100
99Sep.1050150
98Dec.101001100
88Nov.1070170
88Jun.1070170
88Mar.10702140
88Nov.1025125
88Oct.1080180
88Feb.1070170
88Mar.101001100
88Aug.1070170
88Jul.1070170
88Dec.101001100
74Jan.10502100
74Apr.10502100
74Jun.1025250
74Jul.1050150
74Mar.10502100
74Nov.10502100
74Oct.1050150
74Oct.1050150
74Mar.10502100
74Jul.10502100
74Apr.1050150
74Feb.1050150
74Dec.1050150
74Dec.10502100
60May.1050150
60Aug.10502100
60Apr.10502100
60Oct.1050150
60Jan.1050150
60Apr.10502100
60Sep.1050150
60Jul.10502100
60Oct.10502100
60Dec.1070170
60Nov.1070170
60Jun.1070170
60Jun.10702140
60Dec.1070170
55Apr.1070170
55Aug.1025125
55Aug.1025250
55Aug.10502100
55Jun.10702140
45Sep.1025125
45Aug.1025375
45Dec.1050150
45Aug.10502100
45Apr.10502100
45Dec.1050150
45Dec.10503150
45Jun.1025250
45May.1050150
45May.1050150
29Oct.1050150
29Jan.1050150
29Jul.1050150
29Mar.1050150
29Mar.1050150
29Dec.1050150
29Sep.1050150
29Aug.1050150
29Apr.1050150
29Aug.10502100
29Oct.1050150
29Dec.10502100
29Feb.1050150
29Dec.1050150
29Mar.1050150
29Aug.10502100
21Oct.1050150
21Jul.101001100
21Apr.101001100
21Dec.101001100
21Apr.101001100
21Jul.101001100
21Jan.101001100
21Feb.101001100
19Aug.101001100
19Feb.1020120
13Jun.10504200
13Dec.1025375
13Jun.1025250
13Jun.10502100
13Apr.1050150
13Nov.10502100
1Mar.1070170
1Mar.1050150
1May.1070170
1Jun.101001100
1Jan.10702140
1Feb.1070170
1May.1010110
1Dec.1070170
1Apr.1070170
1Sep.1050150
1Feb.1070170
1Dec.10702140
1 Solution

Accepted Solutions
swuehl
MVP
MVP

Hi Excelgod,

you could use expressions like

=count( aggr(nodistinct if( sum( [TRANS.VALUE*QTY]) <100, CUST#), CUST#, MONTH))

for < 100 count and

=count( aggr(nodistinct if( sum( [TRANS.VALUE*QTY]) >=100, CUST#), CUST#,MONTH))

in a table chart with dimension MONTH.

See also attached.

Stefan

View solution in original post

3 Replies
swuehl
MVP
MVP

Hi Excelgod,

you could use expressions like

=count( aggr(nodistinct if( sum( [TRANS.VALUE*QTY]) <100, CUST#), CUST#, MONTH))

for < 100 count and

=count( aggr(nodistinct if( sum( [TRANS.VALUE*QTY]) >=100, CUST#), CUST#,MONTH))

in a table chart with dimension MONTH.

See also attached.

Stefan

Not applicable
Author

Hey Stefan. Thanks a lot Will check your solution immediately.

Not applicable
Author

brilliant. works perfectly. you're genius

p.s. just changed "nondisctinct" to "distinct" since that's what I actually needed (that summary table from Excel shows non-disctinct just because there is no count distinct in Excel pivots.)