Performing calculations following data restructuring