pivot table content calculation - non-optimized
additional example and testing