# Use analytics

## Create new analytic

<div data-full-width="true"><figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/t5zu8BdUEaG9vIdqpOFu/Analytics.png" alt=""><figcaption><p>Fig. 1 – Top: The "Analytics and Reports Overview" Bottom: An opened analytic, still without a chart</p></figcaption></figure></div>

1. Open the menu **Analytics and Reports \[A]** \
   ▷ The "Analytics and Reports Overview" opens
2. Click on **\[B]**, to create an analytic

   ▷ The "Name" window opens
3. Give the analytic a name
4. Click Save\
   ▷ The analytic is saved under the name entered
5. Click in the list of analytics **\[C]** on your created analytic

   ▷ The analytic opens
6. Click on **\[D]**\
   ▷ The "Edit Chart" menu opens

{% hint style="info" %}
An analytic can consist of several charts.

You can find out how to add another chart -> here
{% endhint %}

## Edit a chart

<div data-full-width="true"><figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/5h0CSJCcv6j0EStYEQp6/EED5DA61-E090-4397-B7A5-0AE0DD803CD2.png" alt=""><figcaption><p>Fig. 2 - The "Edit Chart" menu</p></figcaption></figure></div>

### Select data

1. Open the [->"Edit Chart"](#neue-analytic-anlegen)-menu&#x20;
2. Click on **\[J]**, to add an asset
3. Select the attribute of the asset you want to include in the analytic.\
   ▷ You will see a preview of the attribute under **\[N]**
4. Optional: Repeat steps 1 and 2 to add more assets and attributes.
5. Click on **\[K]**, to choose the time period to be displayed.\
   If necessary, enter a **Start date \[M]** and an **End date \[L]** entered in "Asset Modeling".
6. DO NOT click Confirm \[N] if you want to make any further settings.\
   ◈ If you accidentally clicked Confirm and want to continue with the configuration, jump to point [-> Edit chart afterward](#diagramm-nachtraeglich-bearbeiten)&#x20;

### Select display

1. Open the [->"Edit Chart"](#diagramm-bearbeiten-menue-aufrufen)-menu&#x20;
2. Click on **Template \[G]**&#x20;
3. Choose the chart from the available options that best fits your data.
4. You can find an overview of the available charts [here *\[External link\]*](https://www.highcharts.com/docs/index)

### More options

1. Open the [->"Edit Chart"](#diagramm-bearbeiten-menue-aufrufen)-menu&#x20;
2. Click on **Settings \[I]**&#x20;
3. Configure the options you want
4. Click on **Confirm \[N]**\
   ▷ The "Edit Chart" menu closes\
   ▷ The analytic to which the chart belongs is opened

## Open the "Edit Chart" menu

<div data-full-width="true"><figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/J2PbgAyJhdbJfNwqkqYp/BD9818F1-1949-4F79-AF5F-3536DF892DB2.png" alt=""><figcaption><p>Fig. 3</p></figcaption></figure></div>

If you want to edit a chart afterward, you can open the "Edit Chart" menu as follows:

1. Open the menu **Analytics and Reports \[A]** \
   ▷ The "Analytics and Reports Overview" opens
2. Open the analytic that contains the chart you want to edit\
   ▷ If one or more charts are included in the analytic, these charts are displayed.
3. Click on **\[S]**\
   ▷ A menu opens
4. Click on **Edit chart \[T]** \
   ▷ The "Edit Chart" menu opens

## Use multiple Y-axes

### Info

In some cases, you will want to display trends in a chart whose orders of magnitude differ greatly from one another.&#x20;

For example, an indoor temperature sensor usually measures values between 15 and 30. A light sensor, however, regularly measures values in the triple-digit range. &#x20;

If both trends were displayed in a chart with only one Y-axis, the readability of the smaller value would suffer.&#x20;

<figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/KDoDdefyLqLSIOuvuJig/B063FABC-6925-40F4-8A69-CE171507E0E4.png" alt=""><figcaption><p>Fig. 4</p></figcaption></figure>

In *Fig. 4, top* the temperature curve is hardly readable and not meaningful.

In *Fig. 4, bottom* a second Y-axis with a finer scale was added: Now both trends are perfectly readable.

You can create up to 5 separate Y-axes.&#x20;

### Implementation

<div data-full-width="true"><figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/aMVhA6UfjodjIzrGrq8r/7B5308BF-1E9C-423B-BBBB-C5C6D81C1E43.png" alt=""><figcaption><p>The "Edit Chart" menu after the "Multiple Axes" option has been enabled: Additional options are available for each asset</p></figcaption></figure></div>

1. Open the [->"Edit Chart"](#diagramm-bearbeiten-menue-aufrufen)-menu&#x20;
2. Open the tab **Data \[H]**
3. Activate the option **Multiple Axes \[F]**\
   ▷ Additional options are displayed for all added assets
4. For each asset, select in the respective field **\[P]**, which Y-axis it should use\
   ▷ eliona automatically calculates a suitable ratio
5. Optional: Adjust the other options as desired
6. Click on **Confirm \[O]**

## Zoom&#x20;

You can decide whether a chart can be zoomed in on.

<div data-full-width="true"><figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/LVqNB83mqDzf68LRNdfD/C6B5DF8E-F92F-4D09-8F97-25B17BFCEDC4.png" alt=""><figcaption></figcaption></figure></div>

### Enable zoom

1. Open the [->"Edit Chart"](#diagramm-bearbeiten-menue-aufrufen)-menu&#x20;
2. Open the tab **Settings \[I]**
3. Click on **General \[Q]**&#x20;
4. Select under **Allow zoom \[R],** in which axes zooming is allowed
5. Click on **Confirm \[O]**

### Use zoom

1. Open an analytic for which zoom has been enabled
2. Mark the area in the chart you want to zoom into. To do this, hold down the left mouse button and move the mouse.&#x20;
3. Release the left mouse button\
   ▷ The selected area is displayed enlarged
4. To return to the original view, click the "Reset Zoom" field at the top right.

## Variables&#x20;

You can use variables in many fields by putting an attribute in {{double curly braces}}. The value of the respective attribute is displayed in the corresponding field. You can find more about this under:

{% content-ref url="../../academy/twig-templating-in-eliona" %}
[twig-templating-in-eliona](https://docs.buildings.ability.abb/collection/english-v14/academy/twig-templating-in-eliona)
{% endcontent-ref %}

## Colors

Each asset you add is automatically assigned a color. The color assignment is done sequentially based on a predefined list of colors.

You can adjust the colors directly in the list.

Proceed as follows:

1. &#x20;Open the [-> Edit chart](#neue-analytic-anlegen)-menu&#x20;
2. Open the tab **Settings \[I]**
3. Click on **Appearance \[Q]**
4. Scroll down until you see the section **Series colors \[V]** see
5. Click on any color to adjust it

## Series label format

<figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/c6iQScQoqXArmYjvFWEK/image.png" alt=""><figcaption></figcaption></figure>

Under the menu item *settings* in the section *Title* you can adjust the *Series label format* . Here you have the option to use variables to customize the displayed value.

### Available variables

The following variables are available to you:

* `{{unit}}`: Unit of the value (e.g. °C, %, kWh)
* `{{attribute}}`: The name of the attribute whose value is displayed
* `{{aggregatedDataField}}`: The data field on which the aggregation is based
* `{{aggregatedDataRaster}}`: Grid used to aggregate the data
* `{{aggregatedDataType}}`: Type of aggregation (e.g. average, sum)

These variables allow you to make the series label display flexible and dynamic.

#### Example

For example, if you want to dynamically change the label for different types of heat pumps, you could add a condition to the label:

```php
{% if attribute == "average_COP_ground_source_heat_pump" %}
   Ground-source heat pump
{% elseif attribute == "average_COP_air-to-water_heat_pump" %}
   Air-to-water heat pump
{% else %}
   Air-to-air heat pump
{% endif %}
```

In this example, the respective heat pump type is displayed as the series label depending on the attribute.

> ◈ This function allows you to tailor the label precisely to the specific requirements of your analytic by dynamically inserting attributes and other values.

{% hint style="info" %}
You can find more about what is possible here with the variables [-> Here](https://docs.buildings.ability.abb/collection/english-v14/academy/twig-templating-in-eliona).
{% endhint %}

## Display alarms in the analysis

<figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/z5LiPcaK5Pn4q7uSd1mb/Alarm%20in%20analytic%20(2).png" alt=""><figcaption></figcaption></figure>

* To display alarms in your analysis, simply check **\[U] "Show alarms"**.

  ◈ *This is only available for analytics with the "Area" template.*

  ▷ *The alarms are now displayed in the analysis.*

## Use offset function in analytics

With *Offset*-function allows time series to be compared directly with each other – e.g. today's values with those of the previous day or current data with those from the previous year. This makes it possible to **trends**, **seasonal fluctuations** and **operating behavior** analyze effectively.

### Enable offset

<figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/gVOULDutBhQ2XDlSIKW9/Digitaler%20Zwilling%20Link%20(9).png" alt=""><figcaption></figcaption></figure>

1. Open an existing analysis or create a new one.
2. Activate the switch **\[Offset]**\
   ▷ The following options appear:

* **\[Period]**: Specifies **which time period** the data series is shifted in the comparison by (e.g. *1 Day*, *1 Week*, *1 Year*)\
  ◈ This period is multiplied via the field *Time offset* for each data series
* **\[Raster]**: Defines the **time aggregation frame**, with which the data is displayed in comparison (e.g. *15 minutes*, *1 hour*, *1 day*)
* **\[Start date]**: Sets the **start date of the analysis** fixed

### Define time offset per data series

<figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/Uo16hBW1D1cmmlCfMVtW/Digitaler%20Zwilling%20Link%20(10).png" alt=""><figcaption></figcaption></figure>

For each data series (e.g. attribute or calculation), you can define individually:

* **Time offset**: Specifies how many *Period*-units the data series is shifted\
  ◈ Example: Period = "Week", Time offset = 2 → data series shows values from two weeks ago
* **Aggregation mode**: Determines how the data is aggregated in the selected *Grid* aggregated (*Average*, *Sum*, *Min*, …)
* **Custom legend**: Optional name for the data series in the chart (e.g. "Last year", "Previous week")

◈ This function is ideal for comparisons such as *Today vs. Yesterday*, *This week vs. last week* or *Current month vs. previous year*.

## Use quick analytic

<div align="left"><figure><img src="https://content.gitbook.com/content/Nyvwhz1kEMXcHf4HLuZ8/blobs/n3ENFNOPPsuaNNBSXdSl/Schnelle%20analytic.png" alt="" width="176"><figcaption></figcaption></figure></div>

With **Quick Analytic** start an analysis directly with the appropriate attributes – without manual configuration.

The button is available in:\
→ Asset list, asset details, digital twin and dashboard widgets

When clicked, the **analysis configuration**opens, already prefilled with the relevant attributes of the current context.\
You can edit the analysis as desired – just like a normal analysis – and then save it.
