transposing double column headers

Copper Contributor

 I am facing an issue regarding double column headers. I am using Excel sheets as my data source. I have the following data (sample) with different data types.

 

mvrdj_4-1653652800028.png

 

 I need to show the data in different visuals , filters on the basis of month and category but I failed to do so as there are 2 column 

headers. I have used un pivoting columns option in power query but nothing worked. I need the data in the following manner. This is manually scripted data but I cannot do this to millions of rows. 

mvrdj_5-1653652843998.png

 

Any help would be much appreciated.

Thanks in advance.

 

 

1 Reply

@mvrdj The trick is that you need to first transpose the table (without headers). Then merge the first to columns and transpose the table back. Now promote the first row to headers and an un-pivot. Split the column that contains the merged headers, re-pivot and sort. Example attached.