Sometimes displaying data directly from the database is not enough. You need to transform the raw data into useful information that end-users can understand. An example is calculating the time to fulfill an order.

To add a new attribute with a calculated value to an aggregate:

  1. Click ;

  2. Set the name of the new attribute;

  3. While the column is still selected, click 'Add formula' in it, or double-click on the 'Value' property;

  4. Write an expression that calculates the result.


To fetch information about the new orders, and for how many days they are waiting to be shipped:

  1. Drag the Order entity to your aggregate;
  2. On the OrderStatus Label column, click and leave only the 'New' status selected;
  3. Click , and rename it to 'Delay';
  4. While the column is still selected, select the 'Value' property of it. Write the expression that calculates for how many days the order is waiting: IntegerToText(DiffDays(Order.SubmitDate,CurrDate())) + " days"

See Also

Aggregate a Column into a Single Value | Segment Identical Data into Groups