# Querying Time Series Data from Machine Variables

The ENLYZE Power BI Integration allows querying machine data for a defined time period. This data originates from machine variables and follows a time series format, meaning there is **one data point per time interval**.

## Selecting the Required Data and Functions from the Connector

1. Navigate to **Get Data > More** and select **ENLYZE**.
2. Select the table **`Variables`** and the function **`Timeseries`**.
3. Click **Transform Data** to open the Power Query Editor.

## Defining the Variables to Query

The **`Variables`** table contains all active machine variables available in the ENLYZE Manufacturing Data Platform. Using this table directly for a time series query would result in long processing times and an unnecessary data load in the report.

To optimize performance, it is **highly recommended** to filter out only the necessary variables before executing the query.

## Querying Variables Using the `Timeseries` Function

Once the required variables have been selected, the **`Timeseries`** function can be used to define query parameters and retrieve data. The function parameters are:

* **variables** – The filtered version of the `Variables` table used for the query.
* **start** – The start date and time of the query.
* **end** – The end date and time of the query.
* **resolution** – The time interval between data points.
* **resampling\_method** – The method used to aggregate data points within each time interval.

Click **Invoke** to execute the function.

#### Expanding the Query Result

The returned result is a **nested table** (a table inside a table) with one column per machine. Expanding these columns will reveal the time series data.

By default, column names are **UUIDs** of the machines and variables. To display human-readable names instead, a mapping operation is required. Refer to this [tutorial](https://docs.enlyze.com/en/integrations/power-bi/tutorials/mapping-uuids-to-display-names) for instructions on how to perform this mapping.
