ED.UNIT.RANGE
Generation time series for one production unit — average power (MW) or total energy (MWh).
Signature
ED.UNIT.RANGE(up, [start], [end], [agg], [headers], [noDate], [unit])Description
Time series of generation for a single production unit. ENTSO-E A73 publishes at native 15-min cadence. Aggregation is controlled by agg: 0=native, 5min/10min/15min, 1=hourly, 2=daily (default), 3=monthly, 4=quarterly, 5=semiannual, 6=annual, 7=total. agg=0/RAW returns the native 15-min samples and agg=7/T returns a single total value (AVG MW or summed MWh over the whole window) — same semantics as ED.RANGE.
**Unit (unit parameter):** by default each bucket holds the AVERAGE power in MW over the bucket. That's the right number for capacity-factor and dispatch analysis but it's NOT the energy generated — "annual generation 800 MW" doesn't mean 800 MWh, it means 800 MW × 8760 h ≈ 7 TWh. Pass unit="MWh" to get the total energy delivered in each bucket directly. The conversion uses the native 15-min sampling interval: collapse the 15-min samples to a per-hour AVG (which equals MWh in that hour) and SUM the hourly series across the bucket. The result is exact down to the sample. The unit_generation table is 100% MW-stored, so unit="MWh" always works — there is no already-MWh edge case (unlike prices or pre-MWh metrics in ED.RANGE).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| up* | string | — | Unit code (e.g. ALZ1). |
| start | date | — | Start. Defaults: omit end for today (Madrid, with a small overnight cutoff), omit start for 30 days before end. |
| end | date | — | End. Omit for today. |
| agg | 0-7 | string | 2 (daily) | Aggregation is controlled by agg: 0=native, 5min/10min/15min, 1=hourly, 2=daily (default), 3=monthly, 4=quarterly, 5=semiannual, 6=annual, 7=total. 0/RAW returns the native 15-min samples (with unit="MWh" it returns the hourly MWh series — the smallest meaningful energy bucket); 7/T returns a single total value instead of a spill. |
| headers | 0 | 1 | 0 | Set 1 for header row. |
| noDate | 0 | 1 | 0 | Set 1 to omit the period column. |
| unit | "MW" | "MWh" | "MW" | Output unit. "MW" returns the average power in each bucket (default, historical behaviour). "MWh" returns the total energy delivered in each bucket using the native 15-min sample interval — exact down to the sample. |
* Required.
Returns
Spill array — [period, value] rows (agg=7/T returns a single value). Value unit depends on unit (MW or MWh).
Examples
=ED.UNIT.RANGE("VAL2", "2025-01-01",, 3)— Vandellós II monthly average power (MW)=ED.UNIT.RANGE("ALZ1", "2025-07-01", "2025-07-01", 1)— Almaraz I hourly for one day (MW)=ED.UNIT.RANGE("ALZ1", "2025-07-01", "2025-07-01", 0)— Almaraz I native 15-min samples for one day (~96 rows in MW)=ED.UNIT.RANGE("BES5", "2020-01-01",, 6, 1)— Beselga 5 annual with headers (MW)=ED.UNIT.RANGE("VAN2", "2025-01-01",, 6, , , "MWh")— Vandellós II annual energy delivered (MWh)=ED.UNIT.RANGE("ALZ1", "2025-01-01", "2025-12-31", 3, , , "MWh")— Almaraz I monthly energy 2025 (MWh)=ED.UNIT.RANGE("ALZ1", "2025-01-01", "2025-12-31", 7, , , "MWh")— Almaraz I total 2025 generation (MWh) — single value, no spillNotes
- MWh conversion is exact down to the 15-min sample (collapse to per-hour AVG, then SUM across the bucket). Robust to missing samples and independent of any future change in native cadence.
- The
unit_generationtable is 100% MW-stored, sounit="MWh"always works — no 400 error like for prices (EUR/MWh) or pre-MWh metrics inED.RANGE. - With
agg=0/RAWandunit="MWh"the route returns the hourly MWh series rather than per-15-min energy (mirrorsED.RANGE: per-sample energy deltas add cost without analytical gain). - The underlying REST endpoint (
/api/data/unit/range) also acceptstz=(madriddefault /cet/utc) with the same semantics as/api/data/range; the Excel function does not expose atzargument yet.