Round (PQL)

Returns the value of a number rounded to the nearest value. 

  • Returned Output: Numeric
  • Library: PQL \ Granular \ Math
  • Version: 2023.00.000
  • Compatibility: Pyramid Query Language (PQL) data sources

Syntax

Round( <Column Number> , OPTIONAL <Numeric> )

* Click on the function's arguments above for more details on the input values.

Comments
  • The column needs to be an attribute with numerical values in the model.
  • The numeric value indicates the number of decimal points to use for precision. The default is zero.
  • The math operations are not running on measures (aka 'values' or 'metrics'). They are operating on atomic items in the attribute / column itself. These values can then be subsequently used to drive an aggregated metric.
  • For details on how to employ and use this function see the custom column overview.
Different Function types
  • This function is similar to the PQL semantic and common functions of the same name. However, it operates on a column directly at the grain.
  • Compare to the CEILING and FLOOR functions.
  • As a granular function, it is used in the base SQL query itself.

Examples

This example returns a column with the rounded value of each item from the Square Root Tax Amount attribute / column.

Round( [Fact].[Sqrt TaxAmt], 0 )

You can see the effect from this example snippet in column #7, based on the source column in position #6.