Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Unpivoting with Multi-Header Columns

Hello,

I am trying to unpivot a data set that has multiple headers. When I promote the headers to the one I want, I lose the details and no longer know what that header value pertains to since the header names repeat across the columns for multiple stats. Here's an example of what the raw data set looks like:

 

This is what I want the desired state to look like:

 

When I promote the headers before I unpivot, then my data set looks like this at which point I don't know what metrics/stats the columns pertain to (ie. the first two have to do with Avg Audience (000) and the second two relate to Dly Rch (000):

The second issue is if I unpivot how do I get 3 columns with the Daypart info, Avg Audience, and Dly Rch columns?

 

Thanks in advance for your help!

5 Replies