I have a PowerQuery which pulls back two columns; one a Number (an integer), the other Text (a string).
I'd like to create a custom column which concatenates these.
It seems this should work: ="(" & ([Value] as text) & ", " & [Description] & ")"
But this returns error Expression.Error: We cannot convert the value 1 to type Text.
NB: This question relates to the PowerQuery editor (i.e. the M language); not regular Excel worksheet functions. The worksheet function to achieve what I'm after would be =concatenate("(", A2, ", ", B2, ")"), where A2 is Value and B2 is Description.
Use the Number.ToText(n) function.
i.e. ="(" & Number.ToText([Value]) & ", " & [Description] & ")"
See https://msdn.microsoft.com/en-us/library/mt253385.aspx?f=255&MSPPError=-2147217396
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With