# Sampling

## Apply sampling to cube cells

It is possible to apply the same sampling techniques used in a selection to the cells of a cube i.e. Limits, Top N records or N records per table. This means that when a selection is created by dragging cells off a cube, the selection will include the sampling options specified.

1. Create a cube of Income and Occupation at the **People** table.
2. Click on the **Sampling** button to activate the function.
3. Highlight the cells that cover Occupation Director, Manager Professional with Income bands 30-40k, 40-50k, 50-60k.
4. Right click on one of the highlighted cells and select the option **Apply Sampling Limits…**

   5\. Define the sampling to select a **Random 10%**.

   6\. Left drag the highlighted cells onto the workspace to create a Limited selection to find a random 10% of the records in each cell.

Use the **Top N** and **Nper** functions in the same manner as described above to have that sampling method applied to each cell selected.
