When creating an analysis and choosing to **visualise** you can display the sample size within the graph.

The **show sample size **option can be switched on or off through the **modify** menu. The setting selected is sticky for all the analyses created during that session.

**In this article**

- Sample size direction
- Sample size calculation
- Sample size export to PPT and Excel
- Show sample size exceptions

**1. Sample size direction**

The **show sample size **option displays the sample size next to the chart axis labels or legend item labels based on the direction/dimension of the percentage base.

If your percentages are based on the down dimension, which is the default behavior, the sample size appears in the across axis labels. If you have changed the percentages to be based on the across dimension, the sample size will appear in the graph legend.

Note: You will only see the option to change the direction of your percentages when you include percentages in your analysis table.

**2. Sample size calculation**

The sample size calculation depends on the direction of the base.

**Percentages based on a standard axis **

For standard axes, Harmoni uses the **unweighted base** (n=uB) when showing sample size.

In the example below, the percentage base is set to Gender, therefore the sample size is the unweighted base (n=uB) of each gender group, in this case, Female and Male.

When the percentage base switches to Age Groups, the sample size is the unweighted base of each age group.

**Percentages based on a measure **

In the example below; percentage base calculation is set to Gender (standard axis); therefore the sample size is the unweighted base (**n=uB**)

When percentages are based on a **measure**, Harmoni uses the **unweighted count of the Total **(n=**u123**) for the sample size calculation.

In the same analysis, if we set the percentages (and averages) to be based on the measure group, the sample size is now the unweighted counts for the total (n=u123). In some cases, the u123 may be the same as the uB.

**3. Sample size export to PPT and Excel **

When **show sample size** option is turned on in the modify menu, it will also export to Excel or PowerPoint:

- In Excel - the sample size is exported even though you don't see it in the Harmoni table.
- In PowerPoint - the sample size is exported with the labels.

**4. Show sample size exceptions**

**Show sample size** option is not available in the following scenarios:

- When showing sample size in the legend and all the items plotted don’t have the same base. This scenario can occur when using
**apply base**Learn more about how to apply a base in the project tree. in the project tree. - When showing sample size in the across axis and all the items plotted within one of the across labels don’t have the same base. This scenario can occur when using
**apply base**in the project tree. - In an analysis where the percentage base has been set to a dimension Learn more about percentage base zone. that is not plotted in the graph (i.e. not down or across).
- For space graph, plot graph and single number display visualise options.
- Pie graph - this will be available in the future.

**Where to from here?**

Learn more about Visualize.