Announcements
cancel
Showing results for
Did you mean:
Not applicable

## Averages problem

I have 3 regions, each of which contains a group of customers. I would like to be able to plot a chart which shows the sales per month by selected indivuidual customer as well as the average per month for the customers region.

Can someone point me in the right direction please.

Jim

1 Solution

Accepted Solutions

Try something like this for calculating the average: sum({<Customer=,Region=p(Region)>}Sales) / count({<Customer=,Region=p(Region)>}DISTINCT Customer)

See attached example. In the example some salepersons have sales in several regions, but John only has sales in Greater London so he fits your scenario.

talk is cheap, supply exceeds demand
2 Replies

Try something like this for calculating the average: sum({<Customer=,Region=p(Region)>}Sales) / count({<Customer=,Region=p(Region)>}DISTINCT Customer)

See attached example. In the example some salepersons have sales in several regions, but John only has sales in Greater London so he fits your scenario.

talk is cheap, supply exceeds demand
Not applicable
Author

Brilliant Gysbert, I can't open your attachment as I'm still on Personal Edition in the meantime I'll try to get my head around the logic but it works!

Thanks very much for your help with this. Much appreciated

Jim

Community Browser