Forum Discussion
Miss_A
2 years agoRegular Visitor
if text.length
= Table.AddColumn(#"Renamed Columns", "Custom", each if Text.Length[MonthYear]=6 then "0"&[MonthYear] else [MonthYear]) When I write the formula for 1-2023 to 01-2023 Expression.Error: We can...
Syndicate_Admin
2 years agoAdministrator
You forgot some parentheses
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ1MjAyVorVATJh7FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [MonthYear = _t]),
#"Added Custom" = Table.AddColumn(Source, "Custom", each if Text.Length([MonthYear])=6 then "0"&[MonthYear] else [MonthYear])
in
#"Added Custom"