Transforming data with the Pivot transform