Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 31088

Function returning data type Any, not Text

$
0
0

I'm trying to improve M Language readability and reduce code by returning a text data type as opposed to returning a number and then converting it to text.

 

So far, I've tried using the Number.ToText method without luck. I've tried returning the number with double quotes around, i.e

if [Freq] = 12 then "3". Once you look at the column, however, the data type says "Any" as opposed to "Text". When you Close and Load the data to the workbook, the data type is "General" as opposed to Text.

 

Anyway I can return Text to avoid having to do so in a separate step?

 

image.png


Viewing all articles
Browse latest Browse all 31088

Trending Articles