Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Experts,
How can we achieve below pivoting in Power Query or close to this?
Please help?
Getting below error due to duplicate records for User 1, but values are different fpr this user.
Please help
Solved! Go to Solution.
You can try List.Distinct function as aggregation (not available through the UI):
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTI0ABKOjiCWUqwOspgTkDBCEwOpMwGLGaHrjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [User = _t, Template = _t, Title = _t, Value = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Value", Int64.Type}}),
#"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Title]), "Title", "Value", List.Distinct),
#"Expanded AA" = Table.ExpandListColumn(#"Pivoted Column", "AA"),
#"Expanded AB" = Table.ExpandListColumn(#"Expanded AA", "AB")
in
#"Expanded AB"
Not perfect but maybe you can use it.
You can try List.Distinct function as aggregation (not available through the UI):
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTI0ABKOjiCWUqwOspgTkDBCEwOpMwGLGaHrjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [User = _t, Template = _t, Title = _t, Value = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Value", Int64.Type}}),
#"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Title]), "Title", "Value", List.Distinct),
#"Expanded AA" = Table.ExpandListColumn(#"Pivoted Column", "AA"),
#"Expanded AB" = Table.ExpandListColumn(#"Expanded AA", "AB")
in
#"Expanded AB"
Not perfect but maybe you can use it.
Aggeregation is not required , I need data in seperate rows for User 1
Hello,
you Should click on both columns title and value => then you click on the transforming tab => then click on pivot column and you should see the result as per the screenshot below
If I answered your question, please mark my post as solution, Appreciate your Kudos!
Proud to be a Super User! | |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!