fact function

The fact function returns the factorial of the values of the column.

The factorial of a non-negative integer number n is the product of all positive integer values equal or less than the n value.


Function and parameters

fact(column)

Parameter

Description

column

It identifies the column to which you want to apply the formula. Its type must be integer. If it is not integer, an attempt to convert the attribute to integer is made. The column parameter is mandatory.


Example

The following example uses the Bike sales dataset.

Description

Screenshot

  • In the example here, we want to retrieve the factorial of the values of the Order_Quantity attribute.

  • We type the following formula:
    fact($"Order_Quantity")