Skip to main content

Look up the matching tier level for a value.

Example

{
"function": "lookup",
"tier_selector": {
"id": "monthly-power-peak",
"resolution": "monthly",
"unit": "kW"
},
"boundaries": [100.0],
"levels": [3000.0, 5000.0],
"unit": "SEK",
"output": {
"id": "monthly-fixed-fee",
"resolution": "monthly",
"unit": "SEK"
}
}

Power for a certain month = 150 kW → falls into tier 2 (since 150 >= 100) → monthly_fixed_fee for that month = 5000 SEK (the level of the matching tier)

boundaries
number[]
required

Tier boundaries. N contiguous tiers have N-1 boundaries: [0, b1), [b1, b2), ..., [bN-1, ∞).

Minimum array length: 1
Example:
[100]
levels
number[]
required

Level value for each of the N tiers.

Minimum array length: 2
Example:
[3000, 5000]
output
Dataset · object
required

Output Dataset produced by this function, a local name used by subsequent functions to reference this result

Example:
{
"id": "quarter-hourly-energy-offtake",
"resolution": "quarter_hourly",
"unit": "kWh"
}
tier_selector
Dataset · object
required

Reference used to select the matching tier. Each value in here is used to find a matching tier level to produce as output

Example:
{
"id": "quarter-hourly-energy-offtake",
"resolution": "quarter_hourly",
"unit": "kWh"
}
unit
enum<string>
required

Unit shared by all level values.

Available options:
A,
kV,
kW,
kWh,
hours,
SEK,
NOK,
SEK_per_kWh,
SEK_per_kW,
%
function
string
default:lookup
Allowed value: "lookup"