Smart Systems for Home

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

Power Query Number.RoundDown Function: How to Use It

· 5 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

The Number.RoundDown function in Power Query rounds a number down to the nearest integer or specified number of decimal places, always toward zero. It does not require any external tools or setup—just a data source loaded into Power Query in Excel, Power BI, or another supported platform. This function is essential for consistent truncation without rounding up, useful in financial, scientific, or inventory calculations where overestimation must be avoided.

What You'll Need

  • A data source (Excel table, CSV file, database, etc.) loaded into Power Query
  • Microsoft Excel 2016 or later, or Power BI Desktop
  • Basic familiarity with the Power Query Editor interface

Step-by-Step

  1. Open your Excel workbook or Power BI Desktop file and load the data into Power Query. In Excel, go to Data > Get Data > From Table/Range or another source. In Power BI, select Get Data and choose your source.
  2. In the Power Query Editor, locate the column containing the numeric values you want to round down. Ensure the column data type is set to Decimal Number or Whole Number—right-click the column header and select Change Type > Decimal Number if needed.
  3. Click on the column header to select the entire column, then go to the Add Column tab in the ribbon.
  4. Click on Custom Column to open the Custom Column dialog box.
  5. In the New column name field, type a descriptive name like RoundDown_Value.
  6. In the Custom column formula field, enter: Number.RoundDown([YourColumnName]). Replace YourColumnName with the actual name of your column (e.g., Price, Quantity). Do not include quotes around the column name unless it contains spaces or special characters.
  7. Click OK. A new column will appear with all values rounded down to the nearest whole number.
  8. To round down to a specific number of decimal places, modify the formula to include a second argument. For example, to round down to two decimal places: Number.RoundDown([Price], 2).
  9. Review the results. Numbers like 7.99 become 7, 3.14159 becomes 3.14, and -2.8 becomes -3 (rounded toward zero).
  10. Once satisfied, click Close & Load to push the updated data back into Excel or Power BI.

Common Mistakes

  • Using Number.RoundDown on a non-numeric column—this causes an error. Always verify data types before applying the function.
  • Typing the column name in quotes without proper escaping, e.g., Number.RoundDown("Price") instead of Number.RoundDown([Price]). Use square brackets for column references.
  • Forgetting that negative numbers round toward zero: -4.7 becomes -5, not -4. This may surprise users expecting truncation away from zero.
  • Trying to use Number.RoundDown with text or null values. The function fails if any row contains blank or non-numeric entries. Use Table.TransformColumns or add a conditional step to filter out nulls first.
  • Assuming it behaves like Excel’s ROUNDDOWN function without understanding Power Query’s M language syntax. They are similar but not interchangeable.

Tips

  • Use Number.RoundDown([Column], 0) explicitly when rounding to integers—it makes your intent clearer to others reviewing your query.
  • Combine Number.RoundDown with Text.From if you need to convert the result to text for export or display purposes.
  • If you need to round down multiple columns at once, use the Transform > Format > Round Down option on selected columns instead of creating custom columns one by one.
  • For conditional rounding, wrap the function in an if statement: if [Value] <> null then Number.RoundDown([Value], 2) else null.
  • Test your formula on a small sample dataset first. Apply the function to a filtered view of 10 rows to validate behavior before running on full data.
  • Keep your original column. Rename the rounded column to clearly indicate it’s a derived value (e.g., Price_RoundedDown) to avoid confusion during analysis.

Troubleshooting

  • Error: "We cannot convert a value of type Text to type Number" — This means your column contains text or mixed values. Go to the column’s data type icon and select Change Type > Decimal Number. If errors persist, use Remove Errors under the Transform tab to clean the column first.
  • Formula returns null — Check if any values in the column are blank or null. Use the Filter button on the column header and uncheck "null" to exclude them, or use if [Column] = null then null else Number.RoundDown([Column]).
  • Unexpected behavior with negative numbers — This is correct behavior: Number.RoundDown always rounds toward zero. If you need to round away from zero (e.g., -4.7 to -4), use Number.Round([Column], 0, RoundingMode.Down) instead, which uses a different rounding mode.
  • Custom column not appearing — Ensure you clicked OK in the Custom Column dialog and didn’t cancel. If the column appears but is empty, check your formula syntax. Double-check that the column name matches exactly, including case and spaces.
  • Performance slows after applying — If working with large datasets, avoid creating multiple custom columns with similar logic. Instead, use Table.TransformColumns with a list of columns to round down in one step.

Frequently Asked Questions

Can Number.RoundDown handle null values?

No. If the input is null, the function returns null. Always handle nulls using an if statement or filter them out before applying the function to avoid unexpected results.

Does Number.RoundDown work the same in Excel and Power BI?

Yes. The function is part of the M language, which is identical across Power Query implementations in Excel, Power BI, and Azure Data Factory.

Can I round down to more than 15 decimal places?

Technically yes, but precision is limited by floating-point representation. Beyond 15 decimal places, rounding may be affected by internal numeric precision limits. For financial accuracy, stick to 2–4 decimal places.

What’s the difference between Number.RoundDown and Number.Truncate?

They behave identically for positive numbers. For negatives, both round toward zero. In practice, they are interchangeable. Number.Truncate is a synonym in M language.

Can I apply Number.RoundDown to multiple columns at once?

Yes. Select multiple columns by holding Ctrl while clicking their headers, then go to Transform > Format > Round Down. This applies the function to all selected columns simultaneously.

Is Number.RoundDown available in Power Query Online?

Yes. It is supported in all modern versions of Power Query, including those in Excel Online and Power BI Service, as long as the data source is compatible and the query is refreshed in a supported environment.