Forum Discussion
Anonymous
5 years agoNot applicable
Power Query Token Literal Expected
Hi, I'm trying to create a custom column in my query to concatenate two other columns based on some criteria. My data is sensitive, so I'll mod a little the names, but essentially I have somethi...
lbendlin
5 years agoSuper User
See if this code works for you
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8s1PSc1RMFTSUQJjAzAwVIrVQZYyQkgZoUkZmhrAJEFMVElzhEZzZI1GUOuMMK2D6IDLAZmxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Model = _t, #"Serial Number" = _t, #"Desired Column" = _t]),
#"Added Custom" = Table.AddColumn(Source, "Custom", each Text.At([Model],Text.Length([Model])-1) & Text.PadStart([Serial Number],7,"0"))
in
#"Added Custom"