Add a count measure to a metric set
This article shows you how to add a Count measure to a metric set from the Metric Set / Data Binding Panel.
2. Adding a count measure
2.1. Create a new metric set
For this example, create a new metric set from the main menu.
Find your data connector in the Explore window and expand its [Production].[Product] table.
Drag the Name column from the Explore window to the canvas.
This opens the Metric Set panel beside a table visualization showing the values from the Name column.
2.2. Add a count measure
Click click to add in the MEASURES field of the Metric Set panel.
The Metric Set panel is replaced with a list of available measures you can add. Scroll down to the Calculated Elements section and click <Count>.
A Count measure is added to the MEASURES field of the Metric Set panel, and the table visualization is updated to show a Count Measure column.
Next, click the Edit icon for the Count measure.
In the Configure Metric Set Element dialog, go to the Format field and check if its value is N0. If not, change it and then click Submit.
2.3. Add a hierarchy count measure
From the same data connector in the Explore window, drag the Color column to the Measures drop area of the Data Analysis Panel.
Since the Color column is categorized as a hierarchy, a count measure will be automatically created and named Color Count (the name of the hierarchy + count).
By default, the aggregator for a hierarchy count is set to Distinct Count.
To change the aggregator, click the Edit icon for Color Count.
From the Aggregator drop-down, select Count and click Submit.
- Automatic count measures are not supported for OLAP.
- The available aggregators for both measures and hierarchy count measures can be changed in the data cube.
- Totals are not retrieved from OLAP when using hierarchy count measures together with top/bottom settings.