# Selector variables as measures

Adding a Selector variable as statistical measure on a Cube provides 3 functions to select from:

## Mode

Returns the most frequently occurring value in the data set.

Cube statistics can show the Mode average of selector variables. The index of the value is returned in the cube because the result of a cube statistic must be numeric.

**Example:**

- Display a blank cube and add **Gender** to the horizontal axis and **Income** to the vertical axis.
- Click the [![Statistics button](<https://help.apteco.com/assets/images/faststats/image258.gif>)](<https://help.apteco.com/assets/images/faststats/image258.gif>) button, select **Add Statistics** and then select the radio button to **Specify other Table, Variable or Expression**.
- Drag the Destination variable onto the box and select **Mode**.
- Click **OK** and build the cube.

> [!NOTE]
>
> You can short-cut the above process by simply left-dragging the selector variable into the middle of your Cube; by default the Mode function will be applied.

[![Cube Statistics dialog with Destination variable dragged on and Mode function selected](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q117-(2).png>)](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q117-(2).png>)

[![Cube of Gender by Income displaying statistical Mode values for Destination](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q418-(1).png>)](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q418-(1).png>)

By moving your mouse pointer over a cell, a tool-tip provides full details of the Mode value returned. A Mode Destination value of 4.00 equates to Category 4 on the selector pick-list, in this example selector category 06-France.

[![Tooltip on the cube showing the Mode value for a cell — category 06 France](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube_HDI_include_-statistics_Cube_Q117_4.png>)](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube_HDI_include_-statistics_Cube_Q117_4.png>)

*06 France — is the 4<sup>th</sup> destination on the picklist*

In the example above, we see that France is the most frequently occurring Destination for Males earning less than £10k.

## Count Distinct

Returns a value in this cell for the number of distinct instances of this variable found for the records in that cell.

Follow the steps above to access this function, or alternatively right-drag the selector into the middle of your Cube.

**Example:**

- Right-drag the Destination variable onto the Cube and select **Count Distinct(Destination)**

  [![Right-drag context menu showing Count Distinct(Destination) option](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q418-(3).png>)](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q418-(3).png>)
- Rebuild the Cube display

Looking at the same group of Males earning less than £10k, we can now see that they have visited 19 distinct destinations:

[![Cube showing 19 distinct Destination values for Males earning less than £10k](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q418-(2).png>)](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q418-(2).png>)

## Count Mode

Returns a value in this cell for the number of times the modal value has been found.

Follow the steps above to access this function, or alternatively right-drag the selector into the middle of your Cube.

**Example:**

- Right-drag the Destination variable onto the Cube and select **Count Mode(Destination)**

  [![Right-drag context menu showing Count Mode(Destination) option](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q418-(4).png>)](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q418-(4).png>)
- Rebuild the Cube display

  [![Cube showing Count Mode values — France appearing 73,514 times for Males earning less than £10k](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q418-(5).png>)](<https://help.apteco.com/assets/images/faststats/analysis/cubes/selector-variables-as-measures/Cube-HDI-include-statistics-on-a-Cube-Q418-(5).png>)

Looking at the same group of Males earning less than £10k, we can now see that they have visited the most popular destination (in this example, France) 73,514 times.
