Skip to main content

🧊 Cube Designer

Semantic models of cube are a set of data organized by dimensions and measures. The data view aggregated by cube is a fact table: it contains one or more columns to be measured (aggregated) and also contains columns for identifying events associated with related dimension members.

The cube designer includes three sub-functions:

  1. Structure: Designing the physical table relationships of cube
  2. Calculation: Designing calculation member formulas and data preview
  3. Query: Self-writing query language for data query preview

Building cube

Building cube includes information from three parts besides the fact table:

  1. Dimensions
  2. Measures
  3. Calculated members

Creating cube

In the data table area, find the fact table to create the cube, drag it to the model area. In the pop-up window, set:

  • Type: cube;
  • Name: The unique technical name of the cube;
  • Label: Language description of the cube;
  • Table: The fact table used by the cube;
    • Fields: Fields of the fact table;
    • Measure: Whether it is a measure;
    • Associated dimensions: Associated shared dimensions for the cube;

Creating cube

Click apply to create the cube and go to the cube designer interface. The detailed property list of the cube is as follows:

PropertyDescriptionOptional Values
NameUnique name identifierGenerally use English characters
LabelLanguage descriptionUser language
DescriptionLong text descriptionUser language
Default MeasureDefault measure used in queries without specifying measuresMeasures in the cube
VisibleDisplay to the user, otherwise only used for internal calculationsDefault value: true, true / false
EnabledEnable this datasetDefault value: true, true / false
CacheWhether to use data cache for the datasetDefault value: true, true / false
Fact TableFact table of the cubeTables in the data source

Dimensions

There are two ways to add dimensions to cube:

  1. Inline dimension
  2. Shared dimension

Inline dimensions are created directly in the cube interface along with the hierarchy.

Creating a New Dimension

Click the new dimension icon on the dimension (Dimensions) area header to see an additional blank line below.

Select the dimension, and in the property editing interface opened on the right, set the properties of the dimension.

The dimension's property settings are the same as in the ❄️ Dimension Designer.

Creating a New Hierarchy

Click the new icon on the dimension line to add a blank hierarchy.

Select the newly added hierarchy row, and the right property setting column will change to the property setting interface of the hierarchy.

For detailed configuration of hierarchies, refer to the property settings in ❄️ Dimension Designer - Creating Hierarchies.

Creating a New Level

Click the new icon on the dimension line to add one or more level nodes. Click on the level node to set the level properties in the property setting interface. For detailed level property settings, refer to the property settings in ❄️ Dimension Designer - Creating Levels.

Shared Dimensions

In addition to creating inline dimensions in cube, you can also add already created shared dimensions to cube.

Drag the shared dimension from the model area to the dimension area.

Select the added shared dimension to open the right property editing interface:

  • Name: Unique technical name of the dimension in the cube.
  • Foreign Key: Foreign key field associated with this dimension's primary key in the fact table.

The hierarchy and levels of shared dimensions cannot be edited here; you need to go to the dimension designer for editing.

Measures

Click the new measure icon on the Measures line to add a new measure.

Select this blank measure row, and the right setting column will become the measure setting interface. Enter the following information:

See the property list below

Measure Properties

PropertyEnglish NameDescriptionOptional Values
NameNameUnique name identifierGenerally use English characters
LabelCaptionLanguage descriptionUser language
DescriptionDescriptionLong text descriptionUser language
FieldColumnField corresponding to the fact table field in the cube
AggregatorAggregatorMethod of measure aggregation, default is "sum""sum", "count", "min", "max", "avg", and "distinct-count"
Data TypeData TypeField data type, default is "Numeric", except "count" and "distinct-count" measures are "Integer""String" "Integer" "Numeric" "Boolean" "Date" "Time" and "Timestamp"
VisibleVisibleDisplay to the user, otherwise only used for internal calculations
FormattingFormat String
Measure ExpressionMeasure ExpressionUse SQL expression to calculate measure values instead of table fields1. Database dialect; 2. Expression value

Calculated Members

Calculated Members use calculation formulas to calculate the measure fields or dimension members needed for queries.

Click the new icon on the Calculated Members header to create a new calculated member.

Select the newly added calculated member row, and set the calculated member properties in the property editing interface.

Calculated Member Properties

PropertyEnglish NameDescriptionOptional Values
NameNameUnique name identifierGenerally use English characters
LabelCaptionLanguage descriptionUser language
DescriptionDescriptionLong text descriptionUser language
DimensionDimensionDimension to which the calculated member belongsIf it is "Measures," this calculated member is a calculated measure. If it is another dimension, it is a formula member of the dimension
HierarchyHierarchyWhen a dimension is selected as a non-Measures dimension, select a hierarchy to which a formula member belongsHierarchy under the dimension
Parent Member
VisibleVisibleWhether visible to the user
Data TypeData TypeData type
FormulaFormulaFormula of the calculated member
PropertyPropertySuch as "DATATYPE", "SOLVE_ORDER"

Structure

You can design the association of fact tables for cube, currently supporting only one fact table. The ER diagram of the cube is displayed in a star-shaped manner, with the dimensions, measures, and calculated measures of the cube in the center, and the dimension nodes around it.

Dataset ER Diagram

Users can select cube, dimensions, or level fields to edit their property details in the property panel. The dimensions shown in the ER diagram include shared dimensions and inline dimensions. Users can click on the share icon in the upper right corner of the shared dimension node to navigate to the shared

dimension page to view its detailed information.

Calculation

The calculation interface can edit calculation member formulas and preview data for dimensions and measures.

Click the edit button of the calculation member to go to the corresponding calculation page. Edit the calculation member formula in the editor.

Drag dimensions, measures, or calculated members to rows, columns, or filters in the preview area. You can see the corresponding preview data results on the right, helping users verify the correctness of the design of cube and calculation member formulas.

  • Manual Refresh: When enabled, data will only be re-queried when the refresh button is manually clicked.
  • Refresh Button: Manually refresh preview data.
  • Transpose Button: Swap row and column configurations to transpose the preview data rows and columns.

Query

The query interface allows users to write query statements to query cube and verify the correctness of the designed results.

  • MDX Model: Queries are only effective after the model is saved.
  • SQL Model: Currently, only raw physical tables can be queried, and cube cannot be queried directly.