Create a derived field for an R function (sample)

If you created an R function, you can now use it in the derived field. See the sample procedure below.

  1. Open the record to use a derived field based on the R function.
  2. In the Fields column, select Add derived field.
    The Expression Editor appears. See Expression editor.
  3. On the left menu pane, expand R functions and add the required R function.
    The R function is shown in the expression editor screen.
    • data_frame is a list of arguments.
    • The IntConstant an argument defined in the additional arguments.


  4. Modify the expression by typing the required parameters. In the sample expression shown in the screen, the following parameters are added:
    • IntConstant is set to 100.
    • For IntValue, the data is pulled from dbo.Orders.ShipVia.


  5. Click OK.
    Note The following restrictions apply for the derived fields with an R function when they are used in on-demand records:
    • Only the R function from the top level record can be calculated.
    • The field cannot be used in other derived fields or in data and time filters.
    • The field cannot be used in related metrics.
    • The field can have no aggregation or transformation.