# Creating measures on stream fields

A measure is a property that is used to make specific calculations, such as SUM, AVERAGE, COUNT, COUNT\_DISTINCT, MINIMUM, or MAXIMUM. You can create, as part of the Annotate Stream and Shared Dimension steps, a measure or series of measures to further refine your data model.

## Create a measure on a stream field

These steps guide you through creating a measure for a field in the stream using the Annotate Stream step.

1. If you have not done so already, complete steps 1-7 in the [Use the Annotate Stream step](https://docs.pentaho.com/pdia-data-integration/extracting-data-into-pdi/work-with-the-streamlined-data-refinery/use-the-streamlined-data-refinery/building-blocks-for-the-sdr/using-the-annotate-stream-step/use-the-annotate-stream-step).
2. Select **Create Measure** from the **Actions** menu.

   The **Name - Value** table auto-populates with a list of annotation properties for the measure.

   ![Annotate dialog box](https://773338310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYwnJ6Fexn4LZwKRHghPK%2Fuploads%2Fgit-blob-9cf8c203c8008a6432a4bb91dfe44a1a70da39a3%2FSDR_CreateMeasureOnStream.png?alt=media)
3. Enter or edit the values for each annotation component.

| Component            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Measure Name**     | Enter a name for your annotation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Aggregation Type** | <p>Specify a format string or choose from a list of aggregation types:- SUM</p><ul><li>AVERAGE</li><li>COUNT</li><li>COUNT\_DISTINCT</li><li>MINIMUM</li><li>MAXIMUM<br>Note that COUNT and COUNT-DISTINCT are only available for non-numeric fields.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Format String**    | Choose how this field should be formatted, such as currency, general number, or percentage.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Description**      | Enter a brief description for the annotation. This description will be available on the Pentaho Server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Hidden**           | Set to `True` to prevent this annotation from displaying as an available measure in Analyzer. When set to `True`, this annotation is included in the model, but it is not visible to users when the model is published and opened in Analyzer. Set to `False` to allow this annotation to display as an available measure in Analyzer. When set to `False`, this annotation is visible to users when the model is published and opened in Analyzer. The **Hidden** property is useful for annotations needed to build a proper data model, but not needed for analytic purposes. For example, if you are in a multi-tenant environment, you may want to hide the **Tenant ID** annotation while still including it in the data model. |

4\. Use the **Previous** and **Next** buttons to navigate through the fields.

5. When finished, click **OK** to save your changes and close the dialog box, or **Cancel** to close the dialog box without saving your annotations.
