title: Power Query - Converting whole number to text in a CUSTOM COLUMN
body: <p>I need to convert 3 whole number columns to text in a formula when adding a new column inside power query. I know how to do this in dax using FORMAT function but I can't make it work inside power query.</p>
  <p><a href="https://i.stack.imgur.com/wViO2.png" rel="nofollow noreferrer">3 columns are - click to veiw</a></p>
  <p>Then below is my CUSTOM COLUMN:</p>
  <pre><code>    = Table.AddColumn(RefNo.3, &quot;Refernce Number&quot;, each 
  if Text.Length([RefNo.3]) &gt; 1 and Text.Length([RefNo.3]) &lt; 11  then [RefNo.3]
  else if Text.Length([RefNo.2]) &gt; 1 and Text.Length([RefNo.2]) &lt; 11 then [RefNo.2]
  else if Text.Length([RefNo.1]) &gt; 1 and Text.Length([RefNo.1]) &lt; 11 then [RefNo.1]
  else null)
  </code></pre>
  <p>However, at the moment I'm getting this error:
  Expression.Error: We cannot convert a value of type Table to type Number.
  Details:
  Value=[Table]
  Type=[Type]</p>
  <p>So I know I need to convert the whole number columns to text first inside the formula. Also, I had to intentionally convert those 3 columns from text to whole number previously to get rid of redundant values (so that's not an option for me to revert that). thanks in advance guys.</p>