Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Power Query Table.ClearDown: How to Use It

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Table.ClearDown is not a real Power Query function. The function you are probably looking for is Table.Clear, which removes all rows from a table but keeps its column structure, or Table.TransformColumnTypes combined with a filter to clear values. If you have seen "Table.ClearDown" somewhere, it is likely a typo or a custom function name. This guide shows you how to clear a table properly in Power Query, what each method actually does, and how to avoid the common traps that leave you with errors or unexpected nulls.

What You'll Need

  • Power BI Desktop, Excel with Power Query, or Analysis Services with Power Query — the steps are the same, but menu labels can differ slightly by version and region.
  • A query that already returns a table (for example, from Get Data > Excel Workbook or a database source).
  • Basic familiarity with the Power Query Editor: the ribbon, the Queries pane, and the formula bar.

Step-by-Step

  1. Open the Power Query Editor. In Excel, go to Data > Get Data > Launch Power Query Editor. In Power BI Desktop, click Transform Data on the Home ribbon. The editor opens with your queries listed on the left.
  2. Select the query you want to clear. Click its name in the Queries pane. The preview loads in the main grid.
  3. Decide what "clear" means for your case. There are two real options: remove all rows but keep the columns (true clearing), or replace the values with null while keeping the rows. Pick one before you write any code.
  4. To remove all rows and keep columns: go to Home > Keep Rows > Keep Top Rows, and enter 0. This produces a table with the same column names and types but zero rows. The M code looks like Table.FirstN(Source, 0). Alternatively, use the formula bar to type Table.Clear(Source) — this is the actual function name, not Table.ClearDown.
  5. To keep rows but blank the values: select the columns you want to clear, then use Transform > Replace Values and replace the existing values with null. For all columns at once, add a custom step in the formula bar such as Table.TransformColumns(Source, {}, null) — but be aware this replaces every value in every column with null, which is rarely what you want. A safer approach is to select specific columns and use Replace Values on each.
  6. Rename the step for clarity. Right-click the step in the Applied Steps pane and choose Rename. Call it something like "Cleared rows" so the next person understands the intent.
  7. Check the column types. After clearing, Power Query may still show the original types (Text, Whole Number, Date). That is correct — clearing rows does not change types. If you see errors, it is usually because a later step references rows that no longer exist.
  8. Load or close. Click Close & Load (Excel) or Close & Apply (Power BI) to send the empty table to your data model. If you only needed the structure for a template, this is the point to save.

Common Mistakes

  • Typing Table.ClearDown. This function does not exist. Power Query will throw "The name 'Table.ClearDown' wasn't recognized." Use Table.Clear or Table.FirstN(..., 0) instead.
  • Using Table.Clear on a table with zero columns. If your source has no columns (for example, an empty CSV), Table.Clear returns an error. Check the source first.
  • Confusing clear with delete. Clearing rows keeps the query and its column metadata; deleting the query removes it entirely from the Queries pane. If you want the query gone, right-click it and choose Delete.
  • Forgetting downstream steps. If a later step filters or sorts the table, it may fail on an empty table. Review the Applied Steps list and remove or reorder steps that assume rows exist.
  • Expecting the source file to change. Power Query never writes back to the source. Clearing a table in the editor affects only the query output, not the original Excel sheet or database.

Tips

  • Use Table.Clear when you genuinely want an empty table with the same schema — useful for creating a template query that you later append data to.
  • If you want to clear only some columns, select them in the grid and use Replace Values with null rather than clearing the whole table.
  • Keep a duplicate of the original query (right-click > Duplicate) before clearing, so you can compare or restore.
  • Document the step name. "Cleared rows" is clearer than "Changed Type1" when someone else opens the file.
  • Test with a small sample first. Clearing a large table and then loading can take time if downstream steps are heavy.

Troubleshooting

Error: "The name 'Table.ClearDown' wasn't recognized." You typed a function that does not exist. Replace it with Table.Clear or Table.FirstN(Source, 0).

Error: "We cannot convert a value of type Table to type List." This usually means a step is passing the wrong argument. Check the formula bar and confirm you are passing a table, not a list, to Table.Clear.

The table looks empty but the row count is not zero. You may have replaced values with null rather than removing rows. Nulls still count as rows. Use Keep Top Rows = 0 to remove them.

Downstream steps fail after clearing. Open the Applied Steps pane and click each step from the bottom up to see where the error appears. Remove or adjust steps that depend on row data (filters, sorts, merges).

The query is slow after clearing. Clearing itself is fast; slowness usually comes from later steps re-evaluating a large source. Consider filtering at the source before clearing, or disable loading for intermediate queries (right-click > Enable Load off).

You cleared the wrong query. Use Ctrl+Z in the editor to undo the last step, or delete the step from Applied Steps. If you already closed and applied, reopen the editor and remove the step there.

Frequently Asked Questions

Is Table.ClearDown a real Power Query function?

No. The official function is Table.Clear. Table.ClearDown does not exist in the M language and will return a "not recognized" error.

What is the difference between Table.Clear and Table.FirstN?

Table.Clear removes all rows and keeps the column structure. Table.FirstN(Source, 0) does the same thing by keeping zero rows. Both produce an empty table with the same schema; Table.Clear is more explicit about intent.

Does Table.Clear delete the columns too?

No. Table.Clear keeps all columns and their data types. Only the rows are removed. If you want to remove columns, use Table.RemoveColumns.

Can I clear only some columns in Power Query?

Yes. Select the columns you want to blank, then use Transform > Replace Values and replace the current values with null. There is no single built-in "clear selected columns" button, so Replace Values is the standard approach.

Will clearing a table affect my original data source?

No. Power Query is read-only with respect to sources. Clearing rows in the editor changes only the query output, not the Excel file, database, or CSV you loaded from.

Why does my cleared table still show errors?

Errors usually come from later steps that expect rows. Check the Applied Steps pane and remove or reorder steps that filter, sort, or merge on row data after the clear step.