Dax Function: ROUND
Category: Mathematical and Trigonometric Functions
The ROUND function in Power BI is a DAX function used to round a number to a specified number of decimal places. This function helps ensure numerical consistency, particularly when dealing with financial data or other calculations requiring precision.
Purpose:
The ROUND function is primarily used to:
- Standardize numeric values to a desired level of precision.
- Simplify data presentation by eliminating unnecessary decimal places.
- Ensure precision in calculations for better readability and analysis.
Type of Calculations:
- Performs rounding to the nearest value based on standard mathematical rounding rules.
- Supports rounding both up and down depending on the decimal value.
Practical Use Cases:
- Financial Reporting: Round currency values to two decimal places.
- Simplifying Data: Reduce the complexity of numbers in reports by rounding to whole numbers.
- Consistent Precision: Ensure consistent decimal places in calculated measures and visualizations.
ROUND(<number>, <num_digits>)</num_digits></number>
| Parameter | Type | Description |
|---|---|---|
number | Scalar | The numeric value or expression to round. |
num_digits | Scalar | The number of decimal places to round to. Can be positive or negative. |
How Does ROUND Dax Function Works?
The ROUND function applies standard rounding rules:
- If the digit after the rounding position is 5 or greater, the value rounds up.
- Otherwise, the value rounds down.
Mathematical Formula:

Example: For ROUND( 123.456, 2 ):
- Look at the third decimal place (6). Since it is greater than 5, round up.
- The result is 123.46.
What Does It Return?
The ROUND function returns a numeric value that has been rounded to the specified number of decimal places. If the value of num_digits is:
- Positive: Rounds to the specified number of decimal places.
- Zero: Rounds to the nearest integer.
- Negative: Rounds to the left of the decimal point (to tens, hundreds, etc.).
When Should We Use It?
- Formatting Data for Reports: Ensure numeric data is rounded to desired decimal places for presentation.
- Financial Calculations: Standardize currency calculations to two decimal places.
- General Use: Round numbers to whole integers for better visualization.
Examples
Basic Usage
Round 123.456 to 2 decimal places:
RoundedValue = ROUND(123.456, 2)
Output: 123.46.
Column Usage
Apply rounding to a column containing sales values:
RoundedSales = ROUND(Sales[Amount], 0)
Rounds all sales amounts to the nearest integer.
Advanced Usage
Combine rounding with conditional logic:
ConditionalRounding = IF(Sales[Amount] > 1000, ROUND(Sales[Amount], 0), ROUND(Sales[Amount], 2))
Result: Sales over 1000 are rounded to integers, while smaller amounts are rounded to 2 decimal places.
Tips and Tricks
- Use
ROUNDUPandROUNDDOWNfor Control: If you always need to round up or down, use these functions instead ofROUND. - Negative
num_digitsValues: To round numbers to tens, hundreds, or thousands:RoundedToTens = ROUND(1234, -1) // Result: 1230 - Combine with Formatting: Pair rounding with number formatting for cleaner visuals.
Performance Impact of ROUND DAX Function:
- Computationally efficient but may add minimal overhead in large datasets with many rounded values.
- Ensure appropriate precision for critical calculations to avoid rounding errors.
Related Functions You Might Need
- ROUNDUP: Rounds a number up, regardless of the decimal value.
- ROUNDDOWN: Rounds a number down, regardless of the decimal value.
- INT: Truncates the number to its integer part without rounding.
- TRUNC: Truncates a number to a specified number of decimal places.
Want to Learn More?
For more information, check out the official Microsoft documentation for ROUND. You can also experiment with this function in your Power BI reports to explore its capabilities.
If you’re looking to unlock the full potential of Power BI and take your data insights to the next level, our expert Power BI consulting services are here to help. Whether you need assistance with implementing advanced DAX functions like the ones discussed here, creating interactive dashboards, or optimizing your data models for better performance, our team of seasoned Power BI consultants is ready to provide tailored solutions for your business. Visit our Power BI Consulting page to learn more about how we can empower your organization with data-driven decisions.
Negative num_digits rounds to the left of the decimal point. For example, ROUND(1234,−1) results in 1230.
The ROUND function rounds numbers based on standard rounding rules, while TRUNC truncates the number without rounding.
Yes, the ROUND function works seamlessly in calculated columns and measures.
The function rounds the number to the nearest integer.
- ROUNDUP always rounds up to the next higher value.
- ROUNDDOWN always rounds down to the next lower value.
- ROUND follows standard rounding rules.