jaryszek
Member
Members
Forum Posts: 183
Member Since:
February 1, 2019
February 1, 2019
Offline
Hello,
i have the source table:
Name
HotSummerInBerlin |
and now using query:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Attribute", "Value")
in
#"Unpivoted Columns"
How can i keep column from source table?
The result should be:
Name|Attribute|Value
HotSummerInBerlin | Name | HotSummerInBerlin |
Best,
Jacek
Mynda Treacy
Admin
Forum Posts: 4703
Member Since:
July 16, 2010
July 16, 2010
Offline
Hi Jacek,
Add a custom column with this formula:
= Source
Expand the column to reveal the Name again.
Here is the code:
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Attribute", "Value"), #"Added Custom" = Table.AddColumn(#"Unpivoted Columns", "Custom", each Source), #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Name"}, {"Name"}) in #"Expanded Custom"
Mynda
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Xu Zhi Jie
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Catalin Bombea: 1917
SunnyKow: 1432
Anders Sehlstedt: 900
Purfleet: 414
Frans Visser: 346
David_Ng: 306
Hans Hallebeek: 290
lea cohen: 246
Jessica Stewart: 219
A.Maurizio: 216
Newest Members:
Dennis Ringler
Deepak Kumar
Michal Kučera
Stephen Keating
David M Connelly
Quick Analytics
Peter Craven
Thomas Huybs
Cassandra McGuire
Leo Bonaparte
Forum Stats:
Groups: 3
Forums: 24
Topics: 6882
Posts: 30171
Member Stats:
Guest Posters: 49
Members: 33709
Moderators: 2
Admins: 3
Administrators: Mynda Treacy, Philip Treacy, Jessica
Moderators: Velouria, Riny van Eekelen
© Simple:Press —