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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PSB
Helper III
Helper III

text to column with condition

how can I seperate out value column information in different column.

Issiue is that all information is in random order.

2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

@PSB Let me see what I can do. Power Query is a pain for this kind of thing sometimes compared to DAX.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

Greg_Deckler
Community Champion
Community Champion

@PSB OK, this wasn't so bad:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("pZKxDoIwEIZfhXTu0OsdLR0Y0AmjxLASBkWCJo0kLr6+GKGAhKFhvBu++++7Kwp2yg5CGYJEMs6SoQDoKvvO6kdzv7avvLZdHTTZLr3FgIQSJQ+q2tpjW11s10QBPHjm530ah6RYyb3IcxIOJBUaPh/qC/5xADQPHEgiCbVI70secURGr8qQ4C3DkZEoCv/JTg5G2yxLZ1mriR1CZYR35H5ZhPFeUocGt2tebO+CgtBRF7x/Ou39GysX00ZOdXynsLL8AA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [S_NodeId = _t, S_Cell = _t, Attribute = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"S_NodeId", type text}, {"S_Cell", type text}, {"Attribute", type text}, {"Value", type text}}),
    #"Inserted Text Between Delimiters" = Table.AddColumn(#"Changed Type", "Text Between Delimiters", each Text.BetweenDelimiters([Value], "gNBId=", ","), type text),
    #"Renamed Columns" = Table.RenameColumns(#"Inserted Text Between Delimiters",{{"Text Between Delimiters", "Gnbid"}}),
    #"Inserted Text Between Delimiters1" = Table.AddColumn(#"Renamed Columns", "Text Between Delimiters", each Text.BetweenDelimiters([Value], "cellLocalId=", ", "), type text),
    #"Renamed Columns1" = Table.RenameColumns(#"Inserted Text Between Delimiters1",{{"Text Between Delimiters", "CellLocalID"}}),
    #"Inserted Text Between Delimiters2" = Table.AddColumn(#"Renamed Columns1", "Text Between Delimiters", each Text.BetweenDelimiters([Value], "nRPCI=", ","), type text)
in
    #"Inserted Text Between Delimiters2"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@PSB Here is some DAX for getting the Gnbid column. You should be able to easily replicated for the others.

Gnbid = 
    VAR __gNBid = SEARCH("gNBid=",[Value],,0)
    VAR __Start = SEARCH("=",[Value],__gNBid,0)
    VAR __EndTemp = SEARCH(",",[Value],__gNBid,0)
    VAR __End = IF(__EndTemp = 0, LEN([Value]),__EndTemp)
RETURN
    MID([Value],__Start + 1, __End - __Start - 1)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Could you please provide Power Query solution. I have lot of other transformation to apply to this result.

Greg_Deckler
Community Champion
Community Champion

@PSB OK, this wasn't so bad:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("pZKxDoIwEIZfhXTu0OsdLR0Y0AmjxLASBkWCJo0kLr6+GKGAhKFhvBu++++7Kwp2yg5CGYJEMs6SoQDoKvvO6kdzv7avvLZdHTTZLr3FgIQSJQ+q2tpjW11s10QBPHjm530ah6RYyb3IcxIOJBUaPh/qC/5xADQPHEgiCbVI70secURGr8qQ4C3DkZEoCv/JTg5G2yxLZ1mriR1CZYR35H5ZhPFeUocGt2tebO+CgtBRF7x/Ou39GysX00ZOdXynsLL8AA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [S_NodeId = _t, S_Cell = _t, Attribute = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"S_NodeId", type text}, {"S_Cell", type text}, {"Attribute", type text}, {"Value", type text}}),
    #"Inserted Text Between Delimiters" = Table.AddColumn(#"Changed Type", "Text Between Delimiters", each Text.BetweenDelimiters([Value], "gNBId=", ","), type text),
    #"Renamed Columns" = Table.RenameColumns(#"Inserted Text Between Delimiters",{{"Text Between Delimiters", "Gnbid"}}),
    #"Inserted Text Between Delimiters1" = Table.AddColumn(#"Renamed Columns", "Text Between Delimiters", each Text.BetweenDelimiters([Value], "cellLocalId=", ", "), type text),
    #"Renamed Columns1" = Table.RenameColumns(#"Inserted Text Between Delimiters1",{{"Text Between Delimiters", "CellLocalID"}}),
    #"Inserted Text Between Delimiters2" = Table.AddColumn(#"Renamed Columns1", "Text Between Delimiters", each Text.BetweenDelimiters([Value], "nRPCI=", ","), type text)
in
    #"Inserted Text Between Delimiters2"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@PSB Let me see what I can do. Power Query is a pain for this kind of thing sometimes compared to DAX.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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