Referencing Results in Expressions
Summary
This guide explains how to reference results variables within LEAP expressions, detailing the syntax for filtering, unit scaling, and the temporal constraints on referencing internally calculated values.
Key insights
- LEAP allows users to reference results variables—internally calculated values such as total emissions, total costs, or total final energy demand—using a specific syntax: Branch:Variable[Scale Unit, FilterDim1=FilterElement, FilterDim2=FilterElement2]. Users can create these references via the Expression Builder, code completion, or the Branch/Variable Wizard (Ctrl+B).
- Results variables can be filtered by up to two dimensions, including fuel, cost, time slice, effect, balance category, module cost category, or tag. Filters can either include a specific element (dimension=element) or exclude one (dimension<>element). If filtering text is omitted, LEAP returns the total value at the specified branch.
- Due to internal calculation sequences, results variables generally can only be referenced for previous years using the PrevYearValue or LaggedValue functions. An exception exists for calculated Indicator variables, which may reference present-year values because they are calculated after the main routines.
Cite the original document
- APA
- Stockholm Environment Institute (n.d.). Referencing Results in Expressions. https://leap.sei.org/Help24/Expressions/Results_Filters.htm
- Chicago
- Stockholm Environment Institute. Referencing Results in Expressions. n.d. https://leap.sei.org/Help24/Expressions/Results_Filters.htm.
- Wikipedia
- {{cite report |author=Stockholm Environment Institute |title=Referencing Results in Expressions |url=https://leap.sei.org/Help24/Expressions/Results_Filters.htm |access-date=17 August 2026 |via=Climate Insights Directory}}
- BibTeX
- @techreport{stockholmenvironmentinstitutendreferencing, author = {{Stockholm Environment Institute}}, title = {{Referencing Results in Expressions}}, institution = {Stockholm Environment Institute}, url = {https://leap.sei.org/Help24/Expressions/Results_Filters.htm}, urldate = {2026-08-17}, note = {Indexed by Climate Insights Directory} }
Full text
Collected · Record updated