title: Power BI - Expression.Error: We cannot convert the value null to type List
body: <p>I am getting this error when running my power query. Sometimes it refreshes successfully and sometimes it gives me this error. How do I fix this? Is it a data type I have to change?</p>
  <pre><code>Expression.Error:
  We cannot convert the value null to type List.
  Details:
      Value=
      Type=[Type]
  </code></pre>
  <p>Here is the query that threw an error sometimes it refreshes:</p>
  <pre><code>let
  
  List = List.Generate(
      () =&gt; [i=0, x = &quot;&quot;],
      each [i] &lt;= Count,
      each [
          i = [i] + 1,
          x =
          Table.FromRows(((Table.SelectRows(API, each [Index] = i)[Value]){0})[DataResult], { 
  
              &quot;Date&quot;,                
              &quot;Region&quot;,
              &quot;Location&quot;,
              &quot;Name&quot;,
              &quot;VPN&quot;,
              &quot;Category&quot;,
              &quot;Network&quot;,   
              &quot;Percentage&quot;,
              &quot;BadQualityCount&quot;,
              &quot;UnknownCount&quot;,
              &quot;CallCount&quot;
              
          })
      ]
  ),
  
  Result = Table.FromRecords(List),
  Result2 = Table.Skip(Result,1),
  DataResultTable = Table.Combine(Result2[x]),
  DataResultTableWithTypes = Table.TransformColumnTypes(DataResultTable,{            
    
              {&quot;Date&quot;, Date.Type}, 
              {&quot;Region&quot;, type text},
              {&quot;Location&quot;, type text},
              {&quot;Name&quot;, type text},
              {&quot;VPN&quot;, type text},
              {&quot;Category&quot;, type text},
              {&quot;Network&quot;, type text},
              {&quot;Percentage&quot;, type number},
              {&quot;BadQualityCount&quot;, Int64.Type},
              {&quot;UnknownCount&quot;, Int64.Type},
              {&quot;CallCount&quot;, Int64.Type}
  
              }),
  
  Output = Table.SelectRows(DataResultTableWithTypes, each true)
  
  in
      Output
  </code></pre>