Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
lukinfo
Frequent Visitor

Transform table - unfill with join text

I have a table that I want to transform as in the picture

excel1.png

I do reverse fill down (Unfill) using this metod:

https://www.youtube.com/watch?v=USwj-ueJOgc

 

excel2.png

I have this table but I don't know how do Info2 columnn? Is this posible to do ?

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@lukinfo 

Paste the below M code in a new query and check the steps:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k0sylbSUTI2ABKeeWn5Ci5KsTrRSkCeiRFMKAgmZGgJE3LGVOUOEwKbFZJaUaJgAtdoCBMyBwuF5OdVglSaAgmXxBIFR5hCIxOoCNxOYwuwSJFCCFyNGUgkNQ/q1JDMXJAN5lBBuMtMDaAijijOD88vQnK9OVQE7ngjiEgJQo0xWCQxT8EXxUnhidkgB8QCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, Value = _t, Info = _t]),
    #"Replaced Value" = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,{"Name"}),
    #"Filled Down" = Table.FillDown(#"Replaced Value",{"Name"}),
    #"Grouped Rows" = Table.Group(#"Filled Down", {"Name"}, {{"Count", each Text.Combine([Info],","), type nullable text}}),
    Custom1 = #"Replaced Value",
    #"Added Custom" = Table.AddColumn(Source, "Info2", each if Text.Length([Name]) > 0 then 
let nm = [Name] in  Table.SelectRows( #"Grouped Rows" , each [Name] = nm )[Count]{0}
 else "")
in
    #"Added Custom"

Fowmy_0-1700825363471.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@lukinfo 

Paste the below M code in a new query and check the steps:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k0sylbSUTI2ABKeeWn5Ci5KsTrRSkCeiRFMKAgmZGgJE3LGVOUOEwKbFZJaUaJgAtdoCBMyBwuF5OdVglSaAgmXxBIFR5hCIxOoCNxOYwuwSJFCCFyNGUgkNQ/q1JDMXJAN5lBBuMtMDaAijijOD88vQnK9OVQE7ngjiEgJQo0xWCQxT8EXxUnhidkgB8QCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, Value = _t, Info = _t]),
    #"Replaced Value" = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,{"Name"}),
    #"Filled Down" = Table.FillDown(#"Replaced Value",{"Name"}),
    #"Grouped Rows" = Table.Group(#"Filled Down", {"Name"}, {{"Count", each Text.Combine([Info],","), type nullable text}}),
    Custom1 = #"Replaced Value",
    #"Added Custom" = Table.AddColumn(Source, "Info2", each if Text.Length([Name]) > 0 then 
let nm = [Name] in  Table.SelectRows( #"Grouped Rows" , each [Name] = nm )[Count]{0}
 else "")
in
    #"Added Custom"

Fowmy_0-1700825363471.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

lukinfo
Frequent Visitor

I'm impressed. This is exactly what I need. Thank you very much 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors