Forum Discussion
stuntmanpatch
1 year agoRegular Visitor
Needing some help with how to build this table. Custom Columns.
I am struggling with a solution for this challenge, hoping for some inputs. I'm trying to build a new table that consolidates the rows down to the uniques Names, then custom column to pull in the da...
- 1 year ago
This something like this what you are looking for?
let defaultPID = "25416", Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwVNJRCk4tKcnMSwcxI5ViddCEjbALGwOZfpjCJkiqTVHN9sMUNsIubIzdEBO4aiNTE0MzbC5HkzDCpcMYlw6oHbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [PID = _t, Name = _t, Enabled = _t]), set_types = Table.TransformColumnTypes( Source, { {"PID", Int64.Type}, {"Name", type text}, {"Enabled", type text} } ), defaultTable = Table.SelectRows(Source, each [PID] = defaultPID), merge_tables = Table.NestedJoin( Source, {"Name"}, defaultTable, {"Name"}, "Source", JoinKind.LeftOuter ), expand_default_enabled = Table.ExpandTableColumn( merge_tables, "Source", {"Enabled"}, {"DefaultEnabled"} ), sort_table = Table.Buffer( Table.Sort( expand_default_enabled, { {"PID", Order.Ascending}, {"Name", Order.Ascending} } ) ) in sort_table
v-menakakota
Community Support
1 year agoHi stuntmanpatch ,
Thanks for reaching out to the Microsoft fabric community forum.
I would also take a moment to thank speedramps , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Best Regards,
Community Support Team