Forum

Headers spread over...
 
Notifications
Clear all

Headers spread over two rows

9 Posts
2 Users
0 Reactions
70 Views
(@celestialkat)
Posts: 7
Active Member
Topic starter
 

Hi,

When I extract data from my system, it is wrapping headings over Rows 6-7, and each transactional line is also spread over two lines.

How do I use power query to correct this by putting each transaction on only 1 line?

 
Posted : 09/02/2019 12:50 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Katrina,

I cover this in lesson 4.17 of the Power Query course. Have you watched that tutorial yet?

Mynda

 
Posted : 09/02/2019 6:51 am
(@celestialkat)
Posts: 7
Active Member
Topic starter
 

Hi Mynda,

I did watch this tutorial, particularly the part on Nested Column Headers. However, my case seems to be a little different because the headers are not nested, they are *wrapped* over two rows. I wasn't sure how to apply the techniques from your tutorial to the case at hand.

Further, the data itself is all wrapped over two rows.

Am I missing something that is shown in the tutorial video that could help me?

 
Posted : 13/02/2019 2:19 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Katrina,

If they're merged cells then once you format the data in an Excel table for loading to Power Query the rows will un-merge. Have you tried to load the data into Power Query?

Mynda

 
Posted : 13/02/2019 6:38 am
(@celestialkat)
Posts: 7
Active Member
Topic starter
 

Hi Mynda,

The cells are not merged. 

Yes, I did turn the data into an Excel Table and then imported into Power Query. (see screenshot below).

I have unpivoted the data, but what I want is for Column 2 to be stacked BELOW Column 1.

In the same vein, every even numbered column should be stacked below the odd numbered column.

PQ.PNG

 
Posted : 13/02/2019 7:38 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Katrina,

Can you please upload a sample Excel file containing your before data and desired result. It's very difficult to help you from the screenshots.

Thanks,

Mynda

 
Posted : 13/02/2019 10:48 pm
(@celestialkat)
Posts: 7
Active Member
Topic starter
 

File containing raw data and a worksheet showing the desired result attached.

 
Posted : 14/02/2019 1:51 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Katrina,

You can just discard the second header row and rename the columns after cleaning the data. See attached.

Mynda

 
Posted : 14/02/2019 6:31 am
(@celestialkat)
Posts: 7
Active Member
Topic starter
 

Hi Mynda,

Thank you! I took a look at the applied steps and saw that you tackled this by creating a conditional column on the end.

I'll familiarise myself with this.

Thank you so much!

Kind regards

Katrina

 
Posted : 14/02/2019 9:01 pm
Share: