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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi
In powerquery, I would like to insert a row in a specific column which is a copy of another one, I want to create a shift between them, how can I do it without using code as it requires lots of memory.
Output (target is column 2, X is random just to create an additionnal cell in my column):
Column 1 - Column2
A - X
B - A
C - B
D - C
E - D
Solved! Go to Solution.
hello @medmbchr1989
please check if this accomodate your need.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1YlWcgKTzmDSBUy6KsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1, Int64.Type),
#"Added Index1" = Table.AddIndexColumn(#"Added Index", "Index.1", 1, 1, Int64.Type),
#"Merged Queries" = Table.NestedJoin(#"Added Index1", {"Index"}, #"Added Index1", {"Index.1"}, "Added Index1", JoinKind.LeftOuter),
#"Expanded Added Index1" = Table.ExpandTableColumn(#"Merged Queries", "Added Index1", {"Column1"}, {"Column1.1"}),
#"Sorted Rows" = Table.Sort(#"Expanded Added Index1",{{"Column1", Order.Ascending}})
in
#"Sorted Rows"
The steps area :
1. create index column start with 0
2. create another index column start with 1 (basically to shift 1 row)
3. Merge Query between those two index column to return value in matched index.
Hope this will help.
Thank you.
Easy enough,
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1YlWcgKTzmDSBUy6KsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
Column1 = Source[Column1],
ToTable = Table.FromColumns({Column1, {"DUMMY"} & List.RemoveLastN(Column1,1)})
in
ToTable
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Easy enough,
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1YlWcgKTzmDSBUy6KsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
Column1 = Source[Column1],
ToTable = Table.FromColumns({Column1, {"DUMMY"} & List.RemoveLastN(Column1,1)})
in
ToTable
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
hello @medmbchr1989
please check if this accomodate your need.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1YlWcgKTzmDSBUy6KsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1, Int64.Type),
#"Added Index1" = Table.AddIndexColumn(#"Added Index", "Index.1", 1, 1, Int64.Type),
#"Merged Queries" = Table.NestedJoin(#"Added Index1", {"Index"}, #"Added Index1", {"Index.1"}, "Added Index1", JoinKind.LeftOuter),
#"Expanded Added Index1" = Table.ExpandTableColumn(#"Merged Queries", "Added Index1", {"Column1"}, {"Column1.1"}),
#"Sorted Rows" = Table.Sort(#"Expanded Added Index1",{{"Column1", Order.Ascending}})
in
#"Sorted Rows"
The steps area :
1. create index column start with 0
2. create another index column start with 1 (basically to shift 1 row)
3. Merge Query between those two index column to return value in matched index.
Hope this will help.
Thank you.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!