JavaScript Embedded AnalyticsData Setup

Version 3.0.0

The Data panel organises the available data and shows how it is structured across sources.

AG Studio supports multiple data sources. This page explains how data is presented in the Data panel and how it is structured across sources. For how fields behave when used in widgets, see Using Data.

Data Panel Copy Link

The Data Panel lists the data available to the report, grouped by source. For an overview of how the Data Panel fits within the Studio interface, see User Interface.

The Data panel can be used to search for items by name. When a data pill is dragged, valid drop areas are highlighted in blue. Data pills can be dropped into widget configuration slots and Filter Conditions.

Select any data item to switch the Edit Panel to its data-field view, which displays metadata about that item.

Data Items Copy Link

Data items are fields made available in the Data Panel. A field is a data element that can be used in widgets and is one of three types: a column, a calculated column, or a measure.

  • Columns are fields that come directly from the underlying data source and are typically used for categories (grouping) and, where appropriate, as values.
  • Calculated Columns are fields derived from other data that return a value for each row.
  • Measures are pre-aggregated calculations intended for Metrics and KPIs.

Each data item has the following properties:

PropertyDescription
IdThe unique identifier for the data item.
NameThe display name shown in the interface.
DescriptionAdditional supporting information about the data item.
Data TypeThe type of data the item contains, such as text, number, date, or boolean.
Calculation TypeWhether the field is calculated: No Calculation for a column from the source, Calculation for a Calculated Column, or Measure for a Measure.
FormatHow the value is displayed in the interface, for example as text, currency, percentage, or a date format.

Select any field in the Data Panel to open its data-field view, which shows the metadata for that field, including its name, description, data type, calculation type, and format.

Id, Name, and Data Type are required and configured by your developer. Description and Format are optional and also configured by your developer.

Calculation Type reports which of the three kinds of field it is, and that is chosen when the field is created rather than worked out from the data. A field that comes from a data source is always a column, so it shows No Calculation. A calculation is either a Calculated Column or a Measure, and whoever creates it chooses which: your developer for the calculations you are given, you for the ones you add yourself (see Calculations).

The choice decides how the field can be used. A column or a Calculated Column holds a value for each row, so when you use one as a value in a widget you choose how to aggregate it. A Measure is already aggregated, so it brings its own aggregation and no other can be applied to it. See Using Data.

Data Source Copy Link

Data items shown in the Data Panel are grouped by data source. Reports can be powered by one data source or multiple data sources.

When the report uses a single data source, all fields and calculations come from the same source. Widgets can be configured without thinking about relationships.

When multiple data sources are used, every data item is listed under the source it comes from. A calculation is listed under a single source as well, even when its expression reads from more than one. A calculation you create stays in the section you created it in, whatever its expression later references. A calculation your developer provides is listed under the first source its expression reaches, whether it names that source itself or reaches it through another calculation it references. One that reaches no source at all is listed in a Computed Columns section at the end of the panel.

If relationships exist between data sources, data items can be combined across sources when Configuring Widgets. If no relationship exists between selected data, the interface prevents invalid combinations.

When you use data from multiple sources, you can create widgets that combine data items from different sources. In the example below, the table widget displays product names from the Products table along with order metrics from the Order Items table, including quantity, unit price, and net sales.

Calculated Fields Copy Link

Some fields in the Data panel are calculations rather than raw source columns. Calculations are derived from other fields, and are either provided by your developer or created by you (see Calculations). They are computed at runtime rather than stored in the underlying data, so they update as the data changes. There are two types of calculations:

Calculated Columns - Non-aggregated calculations that return a value for each row. They are useful for transforming data (for example, cleaned labels), bucketing values (for example, a band), or computing flags based on logic.

Measures - Pre-aggregated calculations that compute values at the dataset level or per category. When a Measure is used without any grouping categories, it returns a single aggregated value for the entire dataset (for example, total revenue across all regions). When used with categories, it returns one value per category (for example, total revenue per region). Measures are intended for Metrics and KPIs and do not support changing aggregation at runtime.

Both are derived from other fields and computed at runtime. The difference is whether the value arrives already aggregated. A Calculated Column does not, so it behaves like any other column in a widget and you choose how to aggregate it. A Measure does, so it carries its own aggregation and none can be applied on top.

IconDescription
Number data type
Number data types
Calculated number data type
Calculated number data type

In the example below, the table demonstrates a measure grouped by product. Line Net (sum) is an aggregated column calculated from order items. Gross Margin % is a measure that shows the aggregated margin percentage for each product.