Skip to main content Skip to complementary content


Defining a hypercube

To define your hypercube, you access it through the Properties property HyperCubeDef.

Example: Hypercube definition

            var cubeDef = myTable.Properties.HyperCubeDef;

Using hypercubes for calculations

To use hypercubes for calculations you must first specify valid dimensions and measures. Then you add the dimensions and measures to the hypercube.

Creating dimensions and measures

There are two ways of creating Dimensionsand Measures:

  • Locally in the generic object.
  • Added to the application library for reuse in other generic objects.

Example: Create a local or inline Dimension

            var myInlineDimension = new HyperCubeDimensionqDef { FieldDefs = new[] { "myDimension" } };

Example: Create an application or library Dimension

            var myLibraryDimension = application.CreateDimension();
            myLibraryDimension.Properties.Dim.FieldDefs = new[] {"myDimension"};

Example: Create a local or inline measure

            var myInlineMeasure = new HyperCubeMeasureqDef {Def = "=Sum(value)"};

Example: Create an application or library Measure

            var myLibraryMeasure = application.CreateMeasure();
            myLibraryMeasure.Properties.Measure.Def = "=Sum(value)";

Adding dimensions and measures to the hypercube

When you have created your Dimensions and Measures you can add them to the hypercube.

Example: Add a Dimension to the hypercube

            cubeDef.Dimensions = new List<HyperCubeDimensionDef>
            	new HyperCubeDimensionDef {Def = myInlineDimension},
            	new HyperCubeDimensionDef {LibraryId = myLibraryDimension.Info.Id}

Example: Add a Measure to the hypercube

            cubeDef.Measures = new List<HyperCubeMeasureDef>
            	new HyperCubeMeasureDef {Def = myInlineMeasure},
            	new HyperCubeMeasureDef {LibraryId = myLibraryMeasure.Info.Id}

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!