Thanks Ruben and Maxgro.
(count(TOTAL DISTINCT Customer)/count(TOTAL DISTINCT YearMonth))
only works well with count and sum. Since customers are able to purchase in multiple months, doing a count total distinct will count such customers only once each which means that (count(TOTAL DISTINCT Customer)/count(TOTAL DISTINCT YearMonth)) is not actually equal to the average number of customers per month.
Avg(TOTAL Aggr(count(distinct CustomerID), YearMonth)) takes care of this and appears to be the formula which Qlikview uses in calculation when we tick the box below:
- thanks @Ruben!