Forum Discussion
Add a row based on conditions
- Anonymous4 years ago
Hi Jacob1832 ,
Try to use the Table.InsertRows in the Power Query Editor.
In the advanced editor, like below.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTI0MFCK1YlWSgKyjaDsZCDbGMSOBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [state = _t, value = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"state", type text}, {"value", Int64.Type}}), Custom1 = Table.InsertRows(#"Changed Type",2, { [state = "d", value = 400] }) in Custom1Table.InsertRows - PowerQuery M | Microsoft Docs
How can I manually add a row to an existing table in Power Query? ~ Hey Niels!
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Jacob1832 ,
Try to use the Table.InsertRows in the Power Query Editor.
In the advanced editor, like below.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTI0MFCK1YlWSgKyjaDsZCDbGMSOBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [state = _t, value = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"state", type text}, {"value", Int64.Type}}),
Custom1 = Table.InsertRows(#"Changed Type",2, { [state = "d", value = 400] })
in
Custom1
Table.InsertRows - PowerQuery M | Microsoft Docs
How can I manually add a row to an existing table in Power Query? ~ Hey Niels!
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.