How to plot average of something data graph
I have a data which these fields for a month
- Month
- Country
- Total of Something
- User count
- Avg (calculated as total of something/user count)
While plotting graphs for a month, I want to show Avg. It works if I only show for particular country as the Avg is calculate that way. But when I want to show it for all countries I have to use Avg of Avg which is wrong calculation. How can this problem be solved.
Example for any month:
USA - 100 - 2 - 50
INDIA - 70 - 7 - 10
For both India and USA the Avg would be (100+70)/(2+9) = 18.88
However, since I have to take Avg of Avg it comes out as (50+10)/2 = 30