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.
Related functions
Other functions related to Cube.ReplaceDimensions are:
- Cube.AddAndExpandDimensionColumn
- Cube.AddMeasureColumn
- Cube.ApplyParameter
- Cube.AttributeMemberId
- Cube.AttributeMemberProperty
- Cube.CollapseAndRemoveColumns
- Cube.Dimensions
- Cube.DisplayFolders
- Cube.MeasureProperties
- Cube.MeasureProperty
- Cube.Measures
- Cube.Parameters
- Cube.Properties
- Cube.PropertyKey
- Cube.Transform
