# HyperCubeDef

Defines the properties of a hypercube. For more information about the definition of a hypercube, see *Generic object*.

## Properties

| Name | Description | Type |
| --- | --- | --- |
| qStateName | Name of the alternate state.<br>Default is current selections *$* . | String |
| qDimensions | Array of dimensions. | Array of [NxDimension](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/models-nxdimension.htm) |
| qMeasures | Array of measures. | Array of [NxMeasure](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/models-nxmeasure.htm) |
| qInterColumnSortOrder | Defines the sort order of the columns in the hypercube.<br>Column numbers are separated by a comma.<br>Example: [1,0,2] means that the first column to be sorted should be the column 1, followed by the column 0 and the column 2.<br>The default sort order is the order in which the dimensions and measures have been defined in the hypercube. By default, the pseudo-dimension (if any) is the most to the right in the array.<br>The index of the pseudo-dimension (if any) is -1.<br>Pseudo dimensions only apply for pivot tables with more than one measure.<br>A pseudo dimension groups together the measures defined in a pivot table. You can neither collapse/expand a pseudo dimension nor make any selections in it.<br>Stacked pivot tables can only contain one measure. | Array of Integer |
| qSuppressZero | Removes zero values. | Boolean |
| qSuppressMissing | Removes missing values. | Boolean |
| qInitialDataFetch | Initial data set. | Array of [NxPage](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/models-nxpage.htm) |
| qReductionMode | One of:<br><br><ul><li>N or DATA_REDUCTION_NONE</li><li>D1 or DATA_REDUCTION_ONEDIM</li><li>S or DATA_REDUCTION_SCATTERED</li><li>C or DATA_REDUCTION_CLUSTERED</li><li>ST or DATA_REDUCTION_STACKED</li></ul> | String |
| qMode | Defines the way the data are handled internally by the engine.<br>Default value is *DATA\_MODE\_STRAIGHT* .<br>A pivot table can contain several dimensions and measures whereas a stacked pivot table can contain several dimensions but only one measure.<br><br>One of:<br><br><ul><li>S or DATA_MODE_STRAIGHT</li><li>P or DATA_MODE_PIVOT</li><li>K or DATA_MODE_PIVOT_STACK</li><li>T or DATA_MODE_TREE</li><li>D or DATA_MODE_DYNAMIC</li></ul> | String |
| qPseudoDimPos |  | Integer |
| qNoOfLeftDims | Number of left dimensions.<br>Default value is -1. In that case, all dimensions are left dimensions.<br>Hidden dimensions (e.g. due to unfulfilled calc condition on dimension level) is still counted in this context.<br>The index related to each left dimension depends on the position of the pseudo dimension (if any).<br>For example, a pivot table with:<br><br><ul><li>Four dimensions in the following order: Country, City, Product and Category.</li><li>One pseudo dimension in position 1 (the position is defined in <em>qInterColumnSortOrder</em> )<em>qInterColumnSortOrder</em> is (0,-1,1,2,3).</li><li>Three left dimensions ( <em>qNoOfLeftDims</em> is set to 3).</li></ul><br><br>implies that:<br><br><ul><li>The index 0 corresponds to the left dimension Country.</li><li>The index 1 corresponds to the pseudo dimension.</li><li>The index 2 corresponds to the left dimension City.</li><li>Product and Category are top dimensions.</li></ul><br><br>Another example:<br><br><ul><li>Four dimensions in the following order: Country, City, Product and Category.</li><li>Three left dimensions ( <em>qNoOfLeftDims</em> is set to 3).</li><li>One pseudo dimension.</li><li>The property <em>qInterColumnSortOrder</em> is left empty.</li></ul><br><br>Implies that:<br><br><ul><li>The index 0 corresponds to the left dimension Country.</li><li>The index 1 corresponds to the left dimension City.</li><li>The index 2 corresponds to the left dimension Product.</li><li>Category is a top dimension.</li><li>The pseudo dimension is a top dimension.</li></ul> | Integer |
| qAlwaysFullyExpanded | If this property is set to true, the cells are always expanded. It implies that it is not possible to collapse any cells.<br>The default value is false. | Boolean |
| qMaxStackedCells | Maximum number of cells for an initial data fetch (set in *qInitialDataFetch* ) when in stacked mode ( *qMode* is K).<br>The default value is 5000. | Integer |
| qPopulateMissing | If this property is set to true, the missing symbols (if any) are replaced by 0 if the value is a numeric and by an empty string if the value is a string.<br>The default value is false. | Boolean |
| qShowTotalsAbove | If set to true, the total (if any) is shown on the first row.<br>The default value is false. | Boolean |
| qIndentMode | This property applies for pivot tables and allows to change the layout of the table. An indentation is added to the beginning of each row.<br>The default value is false. | Boolean |
| qCalcCond |  | [ValueExpr](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/models-valueexpr.htm) |
| qSortbyYValue | To enable the sorting by ascending or descending order in the values of a measure.<br>This property applies to pivot tables and stacked pivot tables.<br>In the case of a pivot table, the measure or pseudo dimension should be defined as a top dimension. The sorting is restricted to the values of the first measure in a pivot table. | Integer (int8) |
| qTitle |  | [StringExpr](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/models-stringexpr.htm) |
| qCalcCondition |  | [NxCalcCond](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/models-nxcalccond.htm) |
| qColumnOrder | The order of the columns. | Array of Integer |
| qExpansionState | Expansion state per dimension for pivot mode ( *qMode* is P). | Array of [ExpansionData](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/models-expansiondata.htm) |
| qDynamicScript | Hypercube Modifier Dynamic script string | Array of String |
| qContextSetExpression | Set Expression valid for the whole cube. Used to limit computations to the set specified. | String |
| qSuppressMeasureTotals | If set to true, suppress any measure grand totals, ignoring any AggrFunc. | Boolean |

## See also

[Drill up a hierarchy](https://help.qlik.com/en-US/sense-developer/November2024/csh/engineapi/drill-up-hierarchy)

[Create a hypercube](https://help.qlik.com/en-US/sense-developer/November2024/csh/engineapi/create-hypercube)

[HyperCube](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineJSONAPI/Content/models-HyperCube.htm)