# 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](/en/integrations/power-bi/tutorials/mapping-uuids-to-display-names.md) for instructions on how to perform this mapping.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.enlyze.com/en/integrations/power-bi/tutorials/querying-time-series-data-from-machine-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
