Power Query Number.RoundDown Function: How to Use It
In this article
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
- 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.
- 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.
- Click on the column header to select the entire column, then go to the Add Column tab in the ribbon.
- Click on Custom Column to open the Custom Column dialog box.
- In the New column name field, type a descriptive name like
RoundDown_Value. - In the Custom column formula field, enter:
Number.RoundDown([YourColumnName]). ReplaceYourColumnNamewith 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. - Click OK. A new column will appear with all values rounded down to the nearest whole number.
- 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). - Review the results. Numbers like 7.99 become 7, 3.14159 becomes 3.14, and -2.8 becomes -3 (rounded toward zero).
- Once satisfied, click Close & Load to push the updated data back into Excel or Power BI.
Common Mistakes
- Using
Number.RoundDownon 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 ofNumber.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.RoundDownwith text or null values. The function fails if any row contains blank or non-numeric entries. UseTable.TransformColumnsor 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.RoundDownwithText.Fromif 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
ifstatement: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.