Round

round a number to a specified number of decimal places.

The Round() function in Power FX is used to round a number to a specified number of decimal places.

Depending on the value, the Round() function may round the number up or down to the nearest value.

Syntax

Round(ThisItem.NumberColumn, DecimalPlaces)
  • ThisItem.NumberColumn: The column contains the number values you want to round up.

  • DecimalPlaces: The number of decimal places to round to.

Example

If you have a column UnitPrice and want to round it to 2 decimal places, you can use:

PowerFXCopy codeRound(ThisItem.UnitPrice, 2)

For example:

  • 12.345 becomes 12.35

  • 9.994 becomes 9.99

Best Practices

Combine Round() with functions like Sum(), Average(), or Count() for aggregate data processing. For example, you can calculate the average and then round it for display purposes.

Last updated