# SelectPivotCells method

Information note

This method only applies to hypercubes that are not represented as straight tables. The parameter *qMode* in *HyperCubeDef* must be set either to *P* or *K* .

### Pivot table

Makes selections in the top or left dimension cells of a pivot table or in the data matrix. Only expanded dimensions can be selected.

### Stacked table

Makes selections in the left dimension cells of a stacked table or in the data matrix.

Information note

There is no top dimensions in a stacked table. A stacked table can only contain one measure.

The member **Change** returns the handles of the objects that are updated following the selections. *qSuccess* is set to *true* if the selections are successful and is set to *false* in the following cases:

* The object contains some invalid fields (fields that are not in the data model).
* The selection applies to a locked field.
* A range selection is performed and the parameter *OneAndOnlyOne* is set to true in the definition of the object.

## Parameters

| Name | Description | Mandatory | Type |
| --- | --- | --- | --- |
| qPath | Path to the definition of the object.<br>For example, */qHyperCubeDef* . | Yes | String |
| qSelections | Information about the selections to perform. | Yes | Array of [NxSelectionCell](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/EngineJSONAPI/Content/models-nxselectioncell.htm) |
| qSoftLock | Set to true to ignore locks; in that case, locked fields can be selected. | No | Boolean |
| qDeselectOnlyOneSelected | Set this parameter to true to unselect the last single selected value. There must be only one selected value in the field.<br>The default value is false. | No | Boolean |

## Returns

| Name | Description | Type |
| --- | --- | --- |
| qSuccess | true/false | Boolean |

## See also

[Select dimension cells in a pivot table](https://help.qlik.com/en-US/sense-developer/May2025/csh/engineapi/select-dimension-cells-in-pivot-table)

[Select dimension cells in a stacked table](https://help.qlik.com/en-US/sense-developer/May2025/csh/engineapi/select-dimension-cells-in-stacked-table)

[Select values in a pivot table](https://help.qlik.com/en-US/sense-developer/May2025/csh/engineapi/select-values-in-pivot-table)