title: Power Query Column Average Cannot Convert Null to Type List
body: <p>I have a column (First Salary) that has either a number of a null value. I added another column (CSM_SALARY) to check if it is null, and if so, take the average of First Salary, if not, take the value in Fist Salary. However, when computing the average, it returns the following error:</p>
  <blockquote>
  <p>Expression.Error: We cannot convert the value null to type List.
  Details:
  Value=
  Type=[Type]</p>
  </blockquote>
  <p>I have tried replacing the null values with numbers but receive the exact same error with it saying the number cannot be converted.</p>
  <p>Is there anyway to take the average of a column and ignore null values?</p>
  <pre><code> #&quot;Changed Type&quot; = Table.TransformColumnTypes(#&quot;Renamed Columns5&quot;,{{&quot;FIRST_SALARY&quot;, Int64.Type}}),
   #&quot;Added Custom2&quot; = Table.AddColumn(#&quot;Changed Type&quot;, &quot;CSM_SALARY&quot;, each if [SFDC_ID] = &quot;Internal&quot; then 0 else if [FIRST_SALARY] = null then List.Average([FIRST_SALARY]) else [FIRST_SALARY]),
  </code></pre>
  <p>DATA BEFORE ERROR:
  <img src="https://i.stack.imgur.com/BBOwz.png" alt="DATA" /></p>
  <p>DATA AFTER ERROR
  <img src="https://i.stack.imgur.com/Pfai7.png" alt="DATA" /></p>