Forum Discussion

nmck86's avatar
nmck86
Post Patron
9 years ago
Solved

Moving Columns to Rows or Building Multiple relationships

Hi All,

I have a data set and I am attaching a sample of that for everyone to see. I am wondering how I can get the data flipped from columns to rows for all the 2nd, 3rd, 4th, and 5th level designations. I had tried to have it setup to where I reported off the data with the columns going straight across; however, when I am building relationships between the zip codes provided and a seperate file that I have with county and state listings I am running into issues figuring out how to build relationships with the zip codes 2,3,4 &5. I am only able to build the relationship with the zip code 1. Do you guys know how I can get the data to simply go down in rows? Or do you have any ideas how I can build relationships between not only zip code 1 but all the other zip codes present in the other columns.

 

 

I tried to add this information copy and pasted into this file but ran into some issues... However, the basic layout is below:

UW (From Duke HR File) DesignationName1 DonationAmount1 Designation1Address1 Designation1Address2 Designation1City Designation1Test File ate Designation1ZipCode
UW (From Duke HR File)
DesignationName1DonationAmount1Designation1Address1Designation1Address2Designation1CityDesignation1Test File ateDesignation1ZipCode

 

After that the columns continue and the designation name has a 2 instead of a 1 all the way to designationname5 with all the other columns as well with the number 5.

 

  • Hi nmck86,

     

    In this scenario, you can use the Unpivot option in Query Editor to turns multiple column headers into a single column but in rows. and store their values in another column. For more details about how to use Unpivot option in Power BI, you can refer to this article. :smileyhappy:

     

    2016-04-07_01h04_27

     

    Regards

2 Replies