Convert Columns in Data to rows

Mr_Tidbit

New Member
Joined
Apr 19, 2016
Messages
8
Hello,

I'm currently working with a dataset that is coming in from one of our project offices excel files. The data has 27 columns, I need to take the last 14 columns and create new rows for those entries and keep the data in the first 15 columns. In excel I would look to use a VBA to alter the data, but I'd prefer to do this on my end in Power BI as to not transform their data and the way they're using it. I've attached screenshots of the queries with the headers.
 

Attachments

  • SS1.PNG
    SS1.PNG
    73.3 KB · Views: 10
  • SS2.PNG
    SS2.PNG
    69.5 KB · Views: 8

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Sorry, this is what I'm trying to do with the query, but I have 115 rows coming in from the excel file. So I need to do it for each row.

SS3.PNG
 
Upvote 0
try unpivot last 14 columns
replace eg. Phase1, Phase2 to Phase (and so on with the other Attributes)
Conditional Columns to separate Attributes and their Values
fill down
pivot new Attributes by their Values
filter by null

edit: there will be a problem with null but maybe you will solve it
 
Last edited:
Upvote 0
Thanks for the suggestions. Sorry I got stuck working a different project yesterday and didn't have time to check back in. I'll take a look at your suggestions and see if any of them change the data and I'll let you know. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,226,121
Messages
6,189,106
Members
453,524
Latest member
AshJames

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top