The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi. Sure you can. You can do almost everything with Power Query. Let me copy the code and if you have doubts you can ask for a pbix with the example and the same code. I tried to use your column names for this. Think as Source the word "Origen". I'm sorry I hace my Power Bi in spannish.
#"Filas agrupadas" = Table.Group(Origen, {"Name"}, {{"ToTable", each _, type table [Columna1=text, Columna2=text]}}),
#"Personalizada agregada" = Table.AddColumn(#"Filas agrupadas", "ToList", each Table.ToList(Table.SelectColumns([ToTable], "Product"))),
#"Personalizada agregada1" = Table.AddColumn(#"Personalizada agregada", "ByCommas", each Text.Combine([ToList], ",")),
#"Dividir columna por delimitador" = Table.SplitColumn(#"Personalizada agregada1", "ByCommas", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"Product.1", "Product.2", "Product.3", "Product.4"}),
#"Columnas quitadas" = Table.RemoveColumns(#"Dividir columna por delimitador",{"ToTable", "ToList"})
You have to group by, then convert that to list, join together by commas and finally split commas in columns.
Hope this help
Regards,
Happy to help!
Hi. Sure you can. You can do almost everything with Power Query. Let me copy the code and if you have doubts you can ask for a pbix with the example and the same code. I tried to use your column names for this. Think as Source the word "Origen". I'm sorry I hace my Power Bi in spannish.
#"Filas agrupadas" = Table.Group(Origen, {"Name"}, {{"ToTable", each _, type table [Columna1=text, Columna2=text]}}),
#"Personalizada agregada" = Table.AddColumn(#"Filas agrupadas", "ToList", each Table.ToList(Table.SelectColumns([ToTable], "Product"))),
#"Personalizada agregada1" = Table.AddColumn(#"Personalizada agregada", "ByCommas", each Text.Combine([ToList], ",")),
#"Dividir columna por delimitador" = Table.SplitColumn(#"Personalizada agregada1", "ByCommas", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"Product.1", "Product.2", "Product.3", "Product.4"}),
#"Columnas quitadas" = Table.RemoveColumns(#"Dividir columna por delimitador",{"ToTable", "ToList"})
You have to group by, then convert that to list, join together by commas and finally split commas in columns.
Hope this help
Regards,
Happy to help!
Thanks for your time
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.