Hi Everybody,
We´re building a new DMR to perform a anlysis over our customers. The table used look like this
DATE | CUSTOMER | SALES REPRESENT | SALES AMOUNT | CUSTOMER AGE |
2019-01-01 | JOHN | PETER | 1.000 | 25 |
2019-01-01 | JOHN | SANDRA | 500 | 25 |
2019-01-01 | MARTA | PETER | 100 | 30 |
2019-01-01 | MARTA | SANDRA | 900 | 30 |
2019-01-01 | ANA | SANDRA | 100 | 40 |
We have to calculate the following kpis;
- Number o customers: count distinct (customer)
- Numer of sales represent: count distinct (sales represent)
- Sales amount (sum)
- Customer age: that´s the tricky one. This is the average customer age, but over the customer. Not 25 +25 +30 +30 + 40 / 5 but 25+30+40 / 3
To do that we´re using a measure with average(customer age for customer) and it Works, but althought the processing is set to be done in the dataBase, some processing is done at local level, with a very poor performance (we have over 7 million customers). What´s is the best option to increase performance?
Thanks indeed
Ramón del Rey García