Calculated Fields

The LoadGen Dashboards supports calculated fields that allow you to apply complex expressions to data fields obtained from the dashboard’s data source. As a result, you can use these fields in data visualizations as regular data source fields.

Create a Calculated Field

You can create calculated fields both in the Data Sources page and from the Binding panel.

Data Sources

  1. Press the Show side panel button on the LoadGen Cloud Dashboard page.
  2. Open the Menu by pressing the following icon:
  3. Open the Data Sources page
  4. Select the data source and click the Add Calculated Field button to create a calculated field.

Binding panel

  1. Open the Binding panel, go to the Binding section and click the Add calculated field button (the add-calculated-field-icon icon).

This invokes the Edit Calculated Field dialog, which allows you to construct the required expression.

  • Use the Name option to change the default field name.
  • Use the Field Type option to specify the required calculated field type.

The following elements are available for creating expressions:

Contains available fields and dashboard parameters.
Contains Boolean variables.
Contains different types of functions including aggregate.
Allows you to select operators from the list.
You can add a comment to your expression to explain it and make the expression more readable. Comments are multi-line and begin with /* and end with */.

After creating the expression, click Save to creates a new calculated field and display it in the Field List. This type of a field is indicated with the f glyph.

Edit a Calculated Field

You can configure calculated fields both in the Data Sources page and from the Binding panel:

  • To edit the created field using the Data Sources page, click the calculated field’s Edit button (the wdd-icon-edit-query icon).
  • In the Binding section, select the calculated field you want to edit and click the Edit button (the wdd-icon-editCalcField icon).

This invokes the Edit Calculated Field dialog. You can change the calculated field’s name, type or edit the current expression.
To delete the calculated field, use the calculated field’s Delete button (the wdd-icon-delete-query / wdd-icon-deleteCalField icons).

Create a Custom Field mapping your timezone

All of the dates and times which are retrieved from the LoadGen Agents are stored in UTC date and time format. To convert this to your time zone you can use the AddHours( [ActualTime], +n or -n) function.

In the example below, you can see the contents of a custom field based on the CET time zone including Daylight Savings.

Iif([ActualTime] >= MakeDateTime(2021,10,30,3) AND [ActualTime] <= MakeDateTime(2022,03,27,2),
AddHours([ActualTime], +1),
AddHours([ActualTime], +2))

Was this article helpful?
0 out of 0 found this helpful