Create a metric

After the initial record is defined, you can create a metric.

When records are pulled from your data sources and used in calculations, metrics are the result of these calculations. Defining your metrics is the way to turn your record data into useful pieces of information to be used in graphs, charts, and other visual renditions of data.

Use the following procedure to create a Standard Metric based on the Orders record.

  1. On the Guide screen, select Add new metric.

  2. Enter Order count in the Metric name field. Click Create in the Standard Metric section.

  3. Click Add new field on the right to add Sources.

  4. In the New source type section, select Record. Add the defined records as sources for your metric.

  5. Click the ellipsis button in the Select new source section to open a list of available records.

  6. Select Orders and click OK.

  7. Click OK to go back to the main window.
  8. Map the following fields by dragging them from the left column to the right: OrderDate, OrderID, TotalSales, Employee, and ShipCity. When prompted to set the Time Filter on the OrderDate field, click Yes.

    The mapped fields become the dimensions.

    At this point, all fields that are dragged across (except the OrderDate) will be the Dimensions. The fields that represent metric values should be defined as Values.
  9. Click icon next to Order ID and select Count from the menu. This way, Insight counts each individual order ID as one entity and returns a total of order IDs, thus creating an order count metric. Click the same icon for TotalSales, and select Sum.

    After you set the aggregation as Count for OrderID and as Sum for TotalSales, the Purpose for Order ID and TotalSales fields is defined as Value.

  10. Change the Display Name of OrderID to Order Count in the Property Panel.

  11. Your metric should have the following icons: Employee and ShipCity are dimensions , and Order Count and TotalSales are values .

  12. To store your data, change the metric settings from On-Demand, do not store to Store, using overwrite logic. Click Change at the top right of the screen.

    The Storage details dialog box appears. Select Store, using overwrite logic and click OK.

  13. Save your metric. The following dialog box appears on the screen.

  14. Click Apply to apply and save your changes in the database.