# Data Structures

When having a look at some previous examples, it might not be directly obvious, but we are actually not always working just with single values, such as a number. We also had a look at examples which are actually working with a multi-value set, such as when calculating an *average*.

So each literal has not only a Data Type, but also a Data Structure. Here you see the full list:

## Scalar

A single value is stored in a *Scalar* data structure.

Generally all values are Scalars, but you typically also get Scalars when evaluating boolean or arithmetic operations.

### Examples

Example with `$PowerConsumption`

with dataset of name *PowerConsumption* of type Single Value:

**Vector**

**Vector**

A set of values is stored in a Vector data structure.

Generally only variables, or operations and functions on top of variables, may produce Vectors.

### Examples:

Example with `$PowerConsumption`

with dataset of name *PowerConsumption* of type Time Series:

**GroupedScalar**

**GroupedScalar**

A list of single values, grouped by device or time.

Generally only variables in combination with a `GROUP_BY_DEVICE`

or `GROUP_BY_TIME`

function may produce a GroupedScalar.

### Examples

**GroupedVector**

**GroupedVector**

A list of list of value sets, grouped by device or time.

Generally only variables in combination with a `GROUP_BY_DEVICE`

or `GROUP_BY_TIME`

function may produce a GroupedVector.

### Examples

Last updated