Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
felcar2013
Partner - Creator III
Partner - Creator III

count customers

Hi

I have the table as below ("custhist"). I would like to count customers who did 1,2,3,4.... etc transactions, with a variable periodID. In the sample I have 3 periods, but this could be 10 or 13 or 15.

The end result shall be a table like : the filter is PeriodID  ( 1301 / 1302 / 1303)  >>>> any help very welcome, thanks

numtransactions     num customers

1                              3

2                              2  

3                              6       

4                              7  

5                              3

6                              1

.......................................................

n                              1


>> doc attached

custhist:

load * inline [

customernr,periodID,numtransactions

1,1301,2

2,1301,1

3,1301,4

4,1301,4

5,1301,5

6,1301,2

1,1302,2

2,1302,3

3,1302,2

4,1302,4

5,1302,6

6,1302,7

1,1303,2

2,1303,8

3,1303,5

4,1303,4

5,1303,3

6,1303,2

];

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Sorry, I don't really get what you want to achieve.

Maybe you want to aggregate the transactions per customer in the dimension? Like

=aggr(sum(numtransactions),customernr)

as a calculated dimension?

View solution in original post

2 Replies
swuehl
MVP
MVP

Sorry, I don't really get what you want to achieve.

Maybe you want to aggregate the transactions per customer in the dimension? Like

=aggr(sum(numtransactions),customernr)

as a calculated dimension?

felcar2013
Partner - Creator III
Partner - Creator III
Author

Hi

thanks, it is exactly what i wanted

need to do this for over 100 million records, i do not know, how it will be, but i will try it