ROUND
The ROUND function in Infoveave allows for precise control over numerical data presentation by rounding decimal values to the closest precision.
Applicable to
Calculated Columns
Return Value
The ROUND function returns an integer with the decimal rounded to the nearest precision.
Remark
- The ROUND function is particularly helpful when dealing with financial data, statistical results, and any other numerical data that require consistent formatting.
- If precision is greater than 0, the function rounds to that many decimal places.
- If precision is 0, the function rounds to the nearest integer.
- If precision is less than 0, the function rounds to the left of the decimal point.
- ROUND function does not consider nulls and blank values.
Syntax
ROUND(<expression>, precision)
ROUND in Calculated Columns
Parameter | Description |
---|---|
Expression | A placeholder in a function that is replaced with column names. |
Column Name | The name of the column in the dataset or Datasource containing values to analyze. |
Precision | Specifies the number of decimal places to round the number to. |
Steps to Use
- Write the ROUND function. For instance
ROUND(<expression>, Precision)
- Replace
<expression>
with[Column Name]
. Replace Column Name with the actual name of your required column. - Replace
precision
with the required number of decimal places. - To learn how to add calculated columns in Infoveave, visit the section Calculated Columns.
Example
Objective Consider you have the below sales dataset; your goal is to round the decimal points in the MARKET PRICE column to 2.
ORDER DATE | COUNTRY | CATEGORY | UNIT PRICE | MARKET PRICE | QUANTITY |
---|---|---|---|---|---|
2024-01-03 | Brazil | Baby Food | 38.41 | 43.7874 | 2 |
2024-01-07 | Japan | Spices | 45.56 | 50.8155 | 20 |
Japan | 43.7874 | 10 | |||
2024-01-18 | 32.3019 | 4 | |||
2024-01-22 | Brazil | Cosmetics | 28.335 | 23.0109 | 7 |
2024-01-26 | Canada | 20.185 | 23.0109 | 9 | |
2024-01-04 | France | Cereal | 25.26 | 28.7964 | 9 |
2024-01-09 | Brazil | Cereal | 44.575 | 50.8155 | 8 |
2024-01-14 | Brazil | Snacks | 20.185 | 4 | |
Brazil | Cosmetics | 40.485 | 46.1529 | 2 |
You can use the ROUND function like
ROUND(VALUE([MARKET PRICE]),2)
The new calculated column “NEW MARKET PRICE” will return the below results.
ORDER DATE | COUNTRY | CATEGORY | UNIT PRICE | MARKET PRICE | QUANTITY | NEW MARKET PRICE |
---|---|---|---|---|---|---|
03-01-2024 | Brazil | Baby Food | 38.41 | 43.7874 | 2 | 43.79 |
07-01-2024 | Japan | Spices | 45.56 | 50.8155 | 20 | 50.82 |
Japan | 43.7874 | 10 | 43.79 | |||
18-01-2024 | 32.3019 | 4 | 32.30 | |||
22-01-2024 | Brazil | Cosmetics | 28.335 | 23.0109 | 7 | 23.01 |
26-01-2024 | Canada | 20.185 | 23.0109 | 9 | 23.01 | |
04-01-2024 | France | Cereal | 25.26 | 28.7964 | 9 | 28.80 |
09-01-2024 | Brazil | Cereal | 44.575 | 50.8155 | 8 | 50.82 |
14-01-2024 | Brazil | Snacks | 20.185 | 4 | 0 | |
Brazil | Cosmetics | 40.485 | 46.1529 | 2 | 46.15 |