Cube.ReplaceDimensions

Updated on

Cube.ReplaceDimensions is a function in the Power Query M language that replaces the set of dimensions returned by Cube.Dimensions. The function can be used to modify the dimension attributes, such as adding an ID column, so that the data source can group on the ID rather than the displayed value.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Cube.ReplaceDimensions(
   cube as table,
   dimensions as any,
) as table

Description

Replaces the set of dimensions returned by Cube.Dimensions. For example, this function can be used to add an ID column to a dimension attribute, so that the data source can group on the ID rather than the displayed value.

Other functions related to Cube.ReplaceDimensions are:

BI Gorilla Blog

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/cube-replacedimensions