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

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.

Reply
Anonymous
Not applicable

Data Modelling Assistance

Hi, 

I have the following Source table, 

GUIDChecked by A1-1

Pass or Fail A1-1

Checked by B1-1Pass or Fail B1-1
0001Name APassName CFail
0002Name BFailName AFail

 

, which I want to convert it in the following format - 

GUIDAssetChecked byPass or Fail
0001A1-1Name APass
0001B1-1Name CFail
0002A1-1Name BFail
0002B1-1Name AFail

 

I want to do this in Query Editor and should be dynamic in nature. Both GUIDS, Asset, and Fields may be added later on. In my actual dataset, there 500+ columns, and any query I do takes forever to refresh.

 

I am able to create a dynamic table or lists from the Column names like below, but not sure if that's helpful. Maybe cross join it somehow with the Source query? 

Checked by A1-1Checked byA1-1
Pass or Fail A1-1Pass or FailA1-1
Checked by B1-1Checked byB1-1
Pass or Fail B1-1Pass or FailB1-1

 

My ultimate goal is to normalize the fact table with 500+ columns into dimension tables somehow, and the request format may help. Still kind of exploring various methodologies. Any ideas on how this could be achieved in an efficient manner?

Appreciate the assistance!

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjAwMFTSUfJLzE1VcAQyAhKLi2F8ZyDDLTEzRylWB6zQCCbhBJNA0ghRGAsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [GUID = _t, #"Checked by A1-1" = _t, #"Pass or Fail A1-1" = _t, #"Checked by B1-1" = _t, #"Pass or Fail B1-1" = _t]),
    Custom1 = Table.Combine(
                            Table.TransformRows(
                                                Source,
                                                each let
                                                        t=Table.SplitColumn(
                                                                            Table.Skip(Record.ToTable(_)),
                                                                            "Name",
                                                                            (x)=>let
                                                                                    a=Text.BeforeDelimiter(x," ",{0,1}),
                                                                                    b=Text.AfterDelimiter(x," ",{0,1})
                                                                                 in {[GUID],a,b},
                                                                            {"GUID","x","Assets"}
                                                                           )
                                                     in Table.Pivot(t,List.Distinct(t[x]),"x","Value")
                                               )
                           )
in
    Custom1

View solution in original post

1 REPLY 1
wdx223_Daniel
Super User
Super User

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjAwMFTSUfJLzE1VcAQyAhKLi2F8ZyDDLTEzRylWB6zQCCbhBJNA0ghRGAsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [GUID = _t, #"Checked by A1-1" = _t, #"Pass or Fail A1-1" = _t, #"Checked by B1-1" = _t, #"Pass or Fail B1-1" = _t]),
    Custom1 = Table.Combine(
                            Table.TransformRows(
                                                Source,
                                                each let
                                                        t=Table.SplitColumn(
                                                                            Table.Skip(Record.ToTable(_)),
                                                                            "Name",
                                                                            (x)=>let
                                                                                    a=Text.BeforeDelimiter(x," ",{0,1}),
                                                                                    b=Text.AfterDelimiter(x," ",{0,1})
                                                                                 in {[GUID],a,b},
                                                                            {"GUID","x","Assets"}
                                                                           )
                                                     in Table.Pivot(t,List.Distinct(t[x]),"x","Value")
                                               )
                           )
in
    Custom1

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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 Kudoed Authors