gpierson2018
New Member
- Joined
- Nov 17, 2018
- Messages
- 3
Hi, can anyone help me with this in Power Query? I'm trying to get data like this first table (Table 1) to look like (Table 2).
I understand how to unpivot and pivot in Power Query (and it doesn't work here - I get an error with Sally's hobby)
What I don't understand is how to go through and rename an Attribute that is repeated more than once per unique person/entry, as in my example, "Hobby".
I don't even know what it's called I'm trying to do. This isn't "grouping" I don't believe.
Any help would be appreciated!
..................
[TABLE="width: 384"]
<tbody>[TR]
[TD="width: 64, align: center"]TABLE 1[/TD]
[TD="width: 64, align: center"][/TD]
[TD="width: 64, align: center"][/TD]
[TD="width: 64, align: center"][/TD]
[TD="width: 64, align: center"][/TD]
[TD="width: 64, align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]Attribute[/TD]
[TD="align: center"]Entry[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Tom[/TD]
[TD="align: center"]Age[/TD]
[TD="align: center"]40[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Tom[/TD]
[TD="align: center"]Eyes[/TD]
[TD="align: center"]Blue[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Tom[/TD]
[TD="align: center"]Hobby[/TD]
[TD="align: center"]Bowling[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Bob[/TD]
[TD="align: center"]Age[/TD]
[TD="align: center"]45[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Bob[/TD]
[TD="align: center"]Eyes[/TD]
[TD="align: center"]Brown[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]Age[/TD]
[TD="align: center"]35[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]Eyes[/TD]
[TD="align: center"]Blue[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]Hobby[/TD]
[TD="align: center"]Fishing[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]Hobby[/TD]
[TD="align: center"]Sewing[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]Hobby[/TD]
[TD="align: center"]Singing[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]TABLE 2[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl65"]Name[/TD]
[TD="class: xl66"]Age[/TD]
[TD="class: xl66"]Eyes[/TD]
[TD="class: xl66"]Hobby_1[/TD]
[TD="class: xl66"]Hobby_2[/TD]
[TD="class: xl66"]Hobby_3[/TD]
[/TR]
[TR]
[TD="class: xl65"]Tom[/TD]
[TD="class: xl66"]40[/TD]
[TD="class: xl66"]Blue[/TD]
[TD="class: xl66"]Bowling[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]Bob[/TD]
[TD="class: xl66"]45[/TD]
[TD="class: xl66"]Brown[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]Sally[/TD]
[TD="class: xl66"]35[/TD]
[TD="class: xl66"]Blue[/TD]
[TD="class: xl66"]Fishing[/TD]
[TD="class: xl66"]Sewing[/TD]
[TD="class: xl66"]Singing[/TD]
[/TR]
</tbody>[/TABLE]
I understand how to unpivot and pivot in Power Query (and it doesn't work here - I get an error with Sally's hobby)
What I don't understand is how to go through and rename an Attribute that is repeated more than once per unique person/entry, as in my example, "Hobby".
I don't even know what it's called I'm trying to do. This isn't "grouping" I don't believe.
Any help would be appreciated!
..................
[TABLE="width: 384"]
<tbody>[TR]
[TD="width: 64, align: center"]TABLE 1[/TD]
[TD="width: 64, align: center"][/TD]
[TD="width: 64, align: center"][/TD]
[TD="width: 64, align: center"][/TD]
[TD="width: 64, align: center"][/TD]
[TD="width: 64, align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Name[/TD]
[TD="align: center"]Attribute[/TD]
[TD="align: center"]Entry[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Tom[/TD]
[TD="align: center"]Age[/TD]
[TD="align: center"]40[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Tom[/TD]
[TD="align: center"]Eyes[/TD]
[TD="align: center"]Blue[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Tom[/TD]
[TD="align: center"]Hobby[/TD]
[TD="align: center"]Bowling[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Bob[/TD]
[TD="align: center"]Age[/TD]
[TD="align: center"]45[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Bob[/TD]
[TD="align: center"]Eyes[/TD]
[TD="align: center"]Brown[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]Age[/TD]
[TD="align: center"]35[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]Eyes[/TD]
[TD="align: center"]Blue[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]Hobby[/TD]
[TD="align: center"]Fishing[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]Hobby[/TD]
[TD="align: center"]Sewing[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]Sally[/TD]
[TD="align: center"]Hobby[/TD]
[TD="align: center"]Singing[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]TABLE 2[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl65"]Name[/TD]
[TD="class: xl66"]Age[/TD]
[TD="class: xl66"]Eyes[/TD]
[TD="class: xl66"]Hobby_1[/TD]
[TD="class: xl66"]Hobby_2[/TD]
[TD="class: xl66"]Hobby_3[/TD]
[/TR]
[TR]
[TD="class: xl65"]Tom[/TD]
[TD="class: xl66"]40[/TD]
[TD="class: xl66"]Blue[/TD]
[TD="class: xl66"]Bowling[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]Bob[/TD]
[TD="class: xl66"]45[/TD]
[TD="class: xl66"]Brown[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[/TR]
[TR]
[TD="class: xl65"]Sally[/TD]
[TD="class: xl66"]35[/TD]
[TD="class: xl66"]Blue[/TD]
[TD="class: xl66"]Fishing[/TD]
[TD="class: xl66"]Sewing[/TD]
[TD="class: xl66"]Singing[/TD]
[/TR]
</tbody>[/TABLE]