Cube.Parameters

Table

Returns a table containing the set of parameters that can be applied to a cube.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Cube.Parameters(cube as table) as table

Parameters

NameTypeRequiredDescription
cubetableYesThe cube table to retrieve parameters from.

Return Value

tableA table listing the available parameters for the cube, where each parameter is a function that can be invoked.

Remarks

Cube.Parameters returns a table containing the set of parameters that can be applied to the specified cube. Each parameter is represented as a function that can be invoked to produce a new cube with the parameter and its arguments applied.

Parameters in Analysis Services models allow dynamic configuration of cube queries. They are defined on the server side and may control aspects like default member selections, calculated member behavior, or scoped assignments. Parameters can be applied to the cube using Cube.ApplyParameter or by invoking the parameter function directly.

This function is useful for discovering what parameterization options are available in a cube before building dynamic queries.

Examples

Example 1: List all parameters in a cube

let
    Source = AnalysisServices.Database("localhost", "AdventureWorks"),
    Cube = Source{[Name = "Adventure Works"]}[Data],
    Params = Cube.Parameters(Cube)
in
    Params

Example 2: Discover and apply a parameter

let
    Source = AnalysisServices.Database("localhost", "AdventureWorks"),
    Cube = Source{[Name = "Adventure Works"]}[Data],
    Params = Cube.Parameters(Cube),
    FirstParam = Params{0}[Value],
    Applied = Cube.ApplyParameter(Cube, FirstParam, {"2024"})
in
    Applied

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks