All eazyBI for Jira eazyBI for Confluence Private eazyBI

LookupCube

The LookupCube function is available on Cloud and since eazyBI version 9.1 (not released yet).

EAZYBI Evaluates an MDX expression in another cube of the same account and returns its value. Use it to show measures of another cube in a report.

Syntax

LookupCube(Cube_Name, Expression_String)

LookupCube(Cube_Name, Expression_String, SHARED_CONTEXT)

LookupCube(Cube_Name, Expression_String,
  Dimension_or_Hierarchy [, Dimension_or_Hierarchy ...])

Arguments

Cube_Name

A string with the name of another cube in the same account, for example, "Budget".

Expression_String

A string with an MDX expression that eazyBI evaluates in the other cube, for example, "[Measures].[Budget hours]". The expression uses the dimensions, measures, and calculated members of the other cube. It must return a value (a number, a string, or a date), not a set.

SHARED_CONTEXT

(Optional) Applies the current report context of all dimensions and hierarchies that exist in both cubes.

Dimension_or_Hierarchy

(Optional) One or more dimensions or hierarchies whose current report context is applied in the other cube, for example, [Time] or [Project]. A dimension applies the context of all its hierarchies, a hierarchy applies only the context of that hierarchy.

How the report context is applied

By default, with two arguments, eazyBI evaluates the expression in the default context of the other cube: the rows, columns, and page filters of the report do not change the result. To get a value for the current report row or column, either specify the dimensions to map with the third and following arguments or build the member names into the expression string.

When you specify SHARED_CONTEXT or a list of dimensions and hierarchies, eazyBI finds the current members of the report in the other cube by their unique names, for example, [Time].[2026].[Q1 2026] or [Project].[My project]:

Examples

Budget from another cube

You have imported budget hours from a spreadsheet in a separate Budget cube with the Project and Time dimensions and the measure Budget hours. To compare the budget with the logged hours, define a calculated measure Budget hours in the Issues cube. With SHARED_CONTEXT, the value is filtered by the project and time period of the report row, column, and page filters.

LookupCube("Budget", "[Measures].[Budget hours]", SHARED_CONTEXT)

Then use the result together with the measures of the Issues cube, for example, to calculate the percentage of the budget that is spent:

CASE WHEN [Measures].[Budget hours] > 0 THEN
  [Measures].[Hours spent] / [Measures].[Budget hours]
END

Apply only the Time dimension context

The report shows issues by project and month, and you want to show the total revenue of each month from the Sales cube for all projects. Specify the Time dimension to apply only the time period of the report. The other dimensions of the Sales cube use their default members.

LookupCube("Sales", "[Measures].[Revenue]", [Time])

You can specify several dimensions or hierarchies, for example, LookupCube("Sales", "[Measures].[Revenue]", [Time], [Project]).

Fixed members in the expression

The expression string can specify members of the other cube. This example returns the approved budget of the current project and time period, where Budget type is a dimension that exists only in the Budget cube:

LookupCube("Budget",
  "([Measures].[Budget hours], [Budget type].[Approved])",
  SHARED_CONTEXT
)

Without the third argument, the expression ignores the report context. This example always returns the total budget of the year 2026:

LookupCube("Budget", "([Measures].[Budget hours], [Time].[2026])")

Build the expression string from the report context

You can also build the expression string from the current report members:

LookupCube("Budget",
  "([Measures].[Budget hours], " + [Project].CurrentMember.UniqueName + ")"
)

The context arguments are simpler and faster, and they also apply page filters with several selected members and aggregated calculated members.

Notes

See also