Cube.Transform is a function in the Power Query M language that applies the list of cube functions, transforms, on the cube.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Cube.Transform(
cube as table,
transforms as list,
) as table
Argument | Attribute | Description |
---|---|---|
cube | A table to perform cube transformation on. | |
transforms | Specifies a list of transformations to apply to a cube, using the SapHanaRangeOperator.Type parameter. Available operators for SAP HANA input parameters include: – SapHanaRangeOperator.GreaterThan: for ‘Greater than’ – SapHanaRangeOperator.LessThan: for ‘Less than’ – SapHanaRangeOperator.GreaterThanOrEquals: for ‘Greater than or equals’ – SapHanaRangeOperator.LessThanOrEquals: for ‘Less than or equals’ – SapHanaRangeOperator.Equals: for ‘Equals’ – SapHanaRangeOperator.NotEquals: for ‘Not equals’ |
Description
The Cube.Transform function uses the provided list cube functions to transform the table in the cube argument.
Examples
Here’s an example of how you can use the Cube.Transform function:
let
Source = SapHana.Database ( "server:30015", [ Implementation = "2.0" ] ),
Contents = Source{ [Name = "Contents" ]}[Data],
ADVENTUREWORKS = Contents { [Name = "ADVENTUREWORKS" ] }[Data],
AN_SALES2 = ADVENTUREWORKS{ [ Name = "AN_SALES1" ] }[Data],
AddedItems =
Cube.Transform (
AN_SALES2,
{
{ Cube.ApplyParameter, "Var3", { SapHanaRangeOperator.GreaterThan, 1, null } },
{ Cube.AddMeasureColumn, "Average Sale Per Order", "[Measures].[AverageSalePerOrder]" }
}
)
in
AddedItems
Related functions
Other functions related to Cube.Transform 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.ReplaceDimensions
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy