Announcements
cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Total average of percentages

I want to calculate the average of the percentages (for every fruit, type) as stated in the last column.

This is for Apple, type 1: (11,76%+12,33%) / 2 = 12,05%.

However, when I use the formula  Avg(Aggr(Count({1} FruitID) / Count({1} Total <Date, Fruit>, FruitID), Fruit, Type)) the answer is

(56+101)/(476+819) = 12,12%.

Can somebody help me with calculating the percentages in the last column?

Thanks!

FruitDateTypeCount ({FruitID})Count({1} Total <Date, Fruit>, FruitID)

Count({1} FruitID)

/ Count({1} Total <Date, Fruit>, FruitID)

Average of percentages
Apple25-06-201815647611,76%12,05%
Apple26-06-2018110181912,33%12,05%
Apple25-06-201826847614,29%14,90%
Apple26-06-2018212781915,51%14,90%
Apple25-06-2018335247673,95%73,06%
Apple26-06-2018359181972,16%73,06%
Banana25-06-20181205337,74%33,57%
Banana26-06-20181258529,41%33,57%
Banana25-06-20182335362,26%66,43%
Banana26-06-20182608570,59%66,43%
3 Replies
MVP

Try this

Avg(TOTAL <Fruit> Aggr(Count({1} FruitID)/Count({1} TOTAL <Date, Fruit> FruitID), Fruit, Date, Type))

Anonymous
Not applicable
Author

Thank you!

This wasn't the correct answer but it helped me a lot.