Forum Discussion
Create a new column with concat
Hello,
I am trying to do a simple concat of the ID a hyphen and the title as a new column in Power Query but I keep getting a "Token Literal expect" error. I am not sure what it's looking for.
I know this can be done with DAX but I am trying to learn Power Query at the same time here.
Can you help?
The error is caused by the extra commas. plus if [Id] has values such as numbers, convert to text before concatenating. Use this M code:
Text.From([Id]) & " - " & [Title]
2 Replies
- FAW71Advocate I
I got it to work. I have to use Number.ToText() to convert the ID to text and then use just the ampersan without the comma.
=Number.ToText([ID]) & " - " & [Title] - MasonMASuper User
The error is caused by the extra commas. plus if [Id] has values such as numbers, convert to text before concatenating. Use this M code:
Text.From([Id]) & " - " & [Title]