Divide (PQL)

Evaluates a division on values - offering an option for a default value when there is a division error.

  • Returned Output: Numeric
  • Library: PQL \ Common \ Math
  • Version: 2018.00.000
  • Compatibility:
    • Can be combined with and other PQL function throughout the application.
    • It CANNOT be used with MDX or VBA functions. But it can be used on MDX-based content in other parts of the application.


Divide( <Numeric> , <Numeric> , OPTIONAL <Numeric> )

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

  • The values can be any type of number: integer, float etc.
  • If the standard division of the numerator over the denominator produces a mathematical error, the function returns the optional default value instead,
  • If the default value is not supplied, a normal division is performed.


This example returns 2 from 6 divided by 3


This example returns 1 , because 6 divided by 0 produces an error.