# Energy Report

### Creating an Energy Report

1. Navigate to the Reports section and click "Create Report"
2. Select "Energy" as the Report Type
3. Configure basic settings:
   * Report Name: Provide a descriptive name
   * Timezone: Select appropriate timezone
   * Schedule: Set execution time and days

<figure><img src="/files/8r0X82fIXHuHltldhh5f" alt=""><figcaption><p>Basic Settings</p></figcaption></figure>

### Report Configuration

#### Email Settings

* Add recipient email addresses
* Select email branding template if you have one or more [White Label sites](/portal/white-label.md)

#### Device Selection

* Choose between:
  * Explicit: Select specific devices
  * Product: Include all devices from a product

#### Timeframe Options

**Preset Timeframes**

* Last 7 days (bucketed by day)
* Last 30 days (bucketed by week)
* This month (bucketed by week)
* This year (bucketed by month)
* Custom range (configurable bucket width)

**Custom Range Configuration**

* From: Start date (e.g., "7 days ago")
* Until: End date (e.g., "now")
* Bucket width: Day/Week/Month

<figure><img src="/files/VWRlDfCxxHG5dGexMJng" alt=""><figcaption><p>Energy Report Settings</p></figcaption></figure>

### Understanding Time Bucketing

Time bucketing determines how data is aggregated in the report. Each bucket represents a time period with opening and closing values.

#### Example Data and Bucket Calculation

<figure><img src="/files/gZyYSolp97kEg3DxKrKV" alt=""><figcaption><p>Sample Data</p></figcaption></figure>

With monthly buckets, the Excel report generates:

**January Sheet:**

* Open: 3 (First value in January)
* Close: 12 (First value in February)

**February Sheet:**

* Open: 12 (First value in February)
* Close: 18 (First value in April, as March has no data)

**March Sheet:**

* Open: 18 (Last known value)
* Close: 18 (Next available value)

**April Sheet:**

* Open: 18 (First value in April)
* Close: N/A (Since no data newer than April exists)

<figure><img src="/files/Hr6SeNO8B5gEcrOYZCcp" alt=""><figcaption><p>Report Data</p></figcaption></figure>

#### Bucket Calculation Rules

1. Open Value = First value in bucket period
2. Close Value = First value in next bucket period
3. If no data exists in bucket, use next available value for both open/close
4. Consumption = Close - Open

#### Time Bucketing Process

1. Raw data points are collected
2. Points are grouped by bucket width (day/week/month)
3. Each bucket becomes a sheet in Excel
4. Devices listed as rows in each sheet
5. Open/close values calculated per bucket
6. Consumption computed as difference between close and open


---

# 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.datacake.de/portal/reports/energy-report.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.
