Forum Discussion

michaelsh's avatar
michaelsh
Icon for Kudo Kingpin rankKudo Kingpin
4 years ago

Count Active Customers based on Average Monthly transactions

I have a regular star schema sales model. 
I need to build a measure that counts how many active customers we have in any selected period. 
The Active Customer calculation is when a customer makes on Average more than 5 purchases monthly. 
so if a customer buys 10 purchases on January, nothing on Feb and 2 on March, then his/hers average is 12/3=4, not active. 
I am looking for SUMX solution, not DIVIDE , since my next measure will be how many sales are there for these customers. 
I understand I need to prepare virtual table of customer and month, but when I try SUMMIRIZE it does not include empty month where there were no purchases per customer. I need it to treat them as zero. 
please help

3 Replies