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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Extract data problem,the data is not position in right columns

PowerBInewer00_0-1597499442018.png

The result look like 

NamenumberRoom 
  213452  A
NamenumberRoom 
  217452 A
NamenumberRoom 
  243452 A

 

The result i want like that

NamenumberRoom 
 213452 A
NamenumberRoom 
 217452A
NamenumberRoom 
 243452A

i want to it can auto fixed it instead of changing it manually every times

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous,

 

It can be visualized in the query editor.

V-lianl-msft_0-1597650533687.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUlDSAWMjQ2MTUyMFBUelWJ1oJb/E3FSgYF5pblJqEZARlJ+fqwCWQag3B6knWrmJMVR5LAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, number = _t, #"Room " = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"number", type text}, {"Room ", type text}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if [number] = "number" then [number] else [#"Room "]),
    #"Split Column by Character Transition" = Table.SplitColumn(#"Added Conditional Column", "Custom", Splitter.SplitTextByCharacterTransition({"0".."9"}, (c) => not List.Contains({"0".."9"}, c)), {"Custom.1", "Custom.2"}),
    #"Replaced Value" = Table.ReplaceValue(#"Split Column by Character Transition","","",Replacer.ReplaceValue,{"Custom.2"}),
    #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value"," ","",Replacer.ReplaceText,{"Custom.2"}),
    #"Added Conditional Column1" = Table.AddColumn(#"Replaced Value1", "Custom", each if [Custom.2] = null then [#"Room "] else [Custom.2]),
    #"Removed Columns" = Table.RemoveColumns(#"Added Conditional Column1",{"number", "Room ", "Custom.2"})
in
    #"Removed Columns"

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @Anonymous,

 

It can be visualized in the query editor.

V-lianl-msft_0-1597650533687.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUlDSAWMjQ2MTUyMFBUelWJ1oJb/E3FSgYF5pblJqEZARlJ+fqwCWQag3B6knWrmJMVR5LAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, number = _t, #"Room " = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"number", type text}, {"Room ", type text}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if [number] = "number" then [number] else [#"Room "]),
    #"Split Column by Character Transition" = Table.SplitColumn(#"Added Conditional Column", "Custom", Splitter.SplitTextByCharacterTransition({"0".."9"}, (c) => not List.Contains({"0".."9"}, c)), {"Custom.1", "Custom.2"}),
    #"Replaced Value" = Table.ReplaceValue(#"Split Column by Character Transition","","",Replacer.ReplaceValue,{"Custom.2"}),
    #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value"," ","",Replacer.ReplaceText,{"Custom.2"}),
    #"Added Conditional Column1" = Table.AddColumn(#"Replaced Value1", "Custom", each if [Custom.2] = null then [#"Room "] else [Custom.2]),
    #"Removed Columns" = Table.RemoveColumns(#"Added Conditional Column1",{"number", "Room ", "Custom.2"})
in
    #"Removed Columns"

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

mahoneypat
Microsoft Employee
Microsoft Employee

In the query editor, just delete the name column and rename the number column to Namenumber (if I read your post correctly).  Everytime you refresh, it will automatically do those same steps when it loads the data.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


vanessafvg
Super User
Super User

the result when you combine it in power query? how are you extracting it? can you share what you are doing




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.