Calculate aggregated cell value based on parent row and child rows - TanStack