Forum Discussion
If statement without else
- Anonymous2 years ago
Hi Papillon ,
Is this your expected output?If so, try add a conditional column and then use fill down.
Advanced editor:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUSpKLchJTM7MS48vSa0oMVSK1QGKY0oYQSUwZYxhMphSJhApDHFTXLaY4dBgrhQbCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Objcod1 = _t, Langtext = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Objcod1", type text}, {"Langtext", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if Text.Length([Objcod1])=1 then [Langtext] else null), #"Filled Down" = Table.FillDown(#"Added Custom",{"Custom"}) in #"Filled Down"Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi Papillon ,
Is this your expected output?
If so, try add a conditional column and then use fill down.
Advanced editor:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUSpKLchJTM7MS48vSa0oMVSK1QGKY0oYQSUwZYxhMphSJhApDHFTXLaY4dBgrhQbCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Objcod1 = _t, Langtext = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Objcod1", type text}, {"Langtext", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if Text.Length([Objcod1])=1 then [Langtext] else null),
#"Filled Down" = Table.FillDown(#"Added Custom",{"Custom"})
in
#"Filled Down"
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hey!! Great! THX! This is exactly what I need. I will check that out... Coming back!!!