Define custom measure sorting

Contents[Hide]

1. Overview

This article shows you how to configure measure sorting by specifying an axis hierarchy to sort along and the hierarchy level. A typical scenario is sorting sales (measure) figures for each product (axis hierarchy) from largest to smallest.

You can configure measure sorting from the Metric Set Designer screen or while designing a dashboard via the Data Binding Panel.

2. Defining custom measure sorting

For this example, create or edit a metric set that is configured with 1 measure and 1 hierarchy on the ROWS axis.

From the toolbar, re-visualize the metric set as a bar chart and observe that the OrderQty measure values are unsorted along the Product hierarchy.

Metric set with unsorted measure
Metric set with unsorted measure

In the Metric Set panel, click the Edit icon of the OrderQty measure.

Click to edit measure
Click to edit measure

In the Configure Metric Set Element dialog, scroll down and click Define custom measure sorting.

Configure Metric Set Element dialog
Configure Metric Set Element dialog

In the Configure Measure Sorting dialog, set the following options:

  • Choose a Sort Direction. For this example, set it to Descending so that measure values will go from largest to smallest.
  • Select the Axis Hierarchy. This is the hierarchy on the primary axis you want to sort the measure along, such as Product.
  • Select the Axis Hierarchy Level. Choose a corresponding hierarchy level, such as Product Category.

Configure Measure Sorting dialog
Configure Measure Sorting dialog

Click Submit to save your changes.

Observe that the OrderQty values are now sorted from largest to smallest along the Product (ROWS) axis of the bar chart.

Measure values are now sorted in descending order
Measure values are now sorted in descending order

3. Additional hierarchies on opposite axis

As an extension of the above example, consider adding to the metric set a second hierarchy (OrderDate) on the opposite axis (COLUMNS).

Metric set with 1 measure and 2 hierarchies
Metric set with 1 measure and 2 hierarchies

In this case, when configuring the measure sorting, you need to choose the hierarchy to sort along (e.g., Product) and you must also choose specific members of hierarchies on the opposite axis (e.g., OrderDate).

Additionally select member from opposite axis
Additionally select member from opposite axis

The resulting metric set shows measure values sorted in descending order for the Year 2007.

Measure values are sorted in descending order for 2007
Measure values are sorted in descending order for 2007

4. See also

 

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri