- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
URGENT-Need help for Unpivot in below format
Name | Parameter | Value |
x | y | 12/12/22 |
x | y | 12/12/22 |
x | z | 23 |
x | z | 18 |
Hello Team, I want the above table in below form, Pls support.
Name | y | z |
x | 12/12/22 | 23 |
x | 12/12/22 | 18 |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
File uploaded to https://1drv.ms/x/s!Akd5y6ruJhvhuhOCASxESIut-dlV?e=Sy6hAw
Use below code
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Column1", "Color Name"}, "Attribute", "Value"),
#"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"}),
#"Replaced Value" = Table.ReplaceValue(#"Removed Columns","null",null,Replacer.ReplaceValue,{"Value"}),
#"Grouped Rows" = Table.Group(#"Replaced Value", {"Column1"}, {{"All", each Table.AddIndexColumn(_,"Index",0,1)}}),
#"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"Color Name", "Value", "Index"}, {"Color Name", "Value", "Index"}),
#"Pivoted Column" = Table.Pivot(#"Expanded All", List.Distinct(#"Expanded All"[Column1]), "Column1", "Value"),
#"Removed Columns1" = Table.RemoveColumns(#"Pivoted Column",{"Index"}),
#"Added Custom" = Table.AddColumn(#"Removed Columns1", "Custom", each [Month]=null and [Foil Solid]=null),
#"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Custom] = false)),
#"Removed Columns2" = Table.RemoveColumns(#"Filtered Rows",{"Custom"})
in
#"Removed Columns2"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you vijay for your support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
File uploaded to https://1drv.ms/x/s!Akd5y6ruJhvhuhOCASxESIut-dlV?e=Sy6hAw
Use below code
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Column1", "Color Name"}, "Attribute", "Value"),
#"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"}),
#"Replaced Value" = Table.ReplaceValue(#"Removed Columns","null",null,Replacer.ReplaceValue,{"Value"}),
#"Grouped Rows" = Table.Group(#"Replaced Value", {"Column1"}, {{"All", each Table.AddIndexColumn(_,"Index",0,1)}}),
#"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"Color Name", "Value", "Index"}, {"Color Name", "Value", "Index"}),
#"Pivoted Column" = Table.Pivot(#"Expanded All", List.Distinct(#"Expanded All"[Column1]), "Column1", "Value"),
#"Removed Columns1" = Table.RemoveColumns(#"Pivoted Column",{"Index"}),
#"Added Custom" = Table.AddColumn(#"Removed Columns1", "Custom", each [Month]=null and [Foil Solid]=null),
#"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Custom] = false)),
#"Removed Columns2" = Table.RemoveColumns(#"Filtered Rows",{"Custom"})
in
#"Removed Columns2"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This the table link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Experts
Pls help me here for resolution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WqlDSUaoEYkMjfSAyMjAyUorVwStcBcRGxihcQwul2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, Parameter = _t, Value = _t]),
#"Grouped Rows" = Table.Group(Source, {"Parameter"}, {{"ALL", each Table.AddIndexColumn(_,"Index",0,1)}}),
#"Expanded ALL" = Table.ExpandTableColumn(#"Grouped Rows", "ALL", {"Name", "Value", "Index"}, {"Name", "Value", "Index"}),
#"Pivoted Column" = Table.Pivot(#"Expanded ALL", List.Distinct(#"Expanded ALL"[Parameter]), "Parameter", "Value"),
#"Removed Columns" = Table.RemoveColumns(#"Pivoted Column",{"Index"})
in
#"Removed Columns"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Vijay
Thank you for your prompt support. However, i got stuck over here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to see your input table and output which you are expecting....My code would work on the sample table provided by you but if table is something else, I will have to tweak it appropriately.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
11-15-2024 06:43 AM | |||
03-02-2024 10:09 AM | |||
Anonymous
| 05-07-2024 10:10 AM | ||
03-25-2024 10:43 PM | |||
06-25-2024 01:43 AM |
User | Count |
---|---|
28 | |
27 | |
25 | |
14 | |
10 |
User | Count |
---|---|
24 | |
21 | |
17 | |
16 | |
10 |