title: Power query & power pivot - empty table and clearing pivot
body: <p>Hope you could help.
  I have the below code in my power query and it is working great with a connected power pivot table. 
  As soon as the Source line is returning "This table is empty" it all goes wrong:</p>
  
  <ol>
  <li>Power query return error message that the 2 lines following the source line, are not recognized.</li>
  <li>The table in the power pivot is showing the last results from the last working query.</li>
  </ol>
  
  <p>I need the table to be empty if there are no results.</p>
  
  <p>How do i do that?</p>
  
  <pre><code>let
  
      UrlSource = Excel.CurrentWorkbook(){[Name="Table6"]}[Content],
      #"Changed Type" = Table.TransformColumnTypes(UrlSource,{{"Url", type text}}),
      Url = #"Changed Type"{0}[Url],
  
      UserInput = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
      #"Changed Sagsnummer Type" = Table.TransformColumnTypes(UserInput,{{"Sagsnummer", type text}}),
      Sagsnummer = #"Changed Sagsnummer Type"{0}[Sagsnummer],
  
      Source = OData.Feed(Url &amp; "/FileContacts?$select=CustomLabel_Summary,Name/Name1&amp;$expand=Name&amp;$filter=File/FileNo eq '" &amp; Sagsnummer &amp; "'"),
      #"Expanded Name" = Table.ExpandRecordColumn(Source, "Name", {"Name1"}, {"Name.Name1"}),
      #"Renamed Columns" = Table.RenameColumns(#"Expanded Name",{{"CustomLabel_Summary", "Rolle"}, {"Name.Name1", "Kontakt"}})
  
  in
  
      #"Renamed Columns"
  </code></pre>