Document toolboxDocument toolbox

Sorting in crosstabs

Applies to: Kyvos Enterprise  Kyvos Cloud (SaaS on AWS) Kyvos AWS Marketplace

Kyvos Azure Marketplace   Kyvos GCP Marketplace Kyvos Single Node Installation (Kyvos SNI)


Kyvos visualization allows you to sort measures and dimensions in a crosstab in multiple ways. The following sections explain these in detail.

Dimension sorting

In a Kyvos visualization crosstab, the dimensions and rows are sorted in the order they are defined in the semantic model, i.e., the natural order of sorting.

  • Each dimension is sorted internally in the most common way for that type of data.

  • Numbers are sorted numerically, ascending.

  • Text is sorted alphabetically, ascending.

  • By default, the dimensions follow Hierarchical Ascending sorting, preserving the natural order of the hierarchy of the members in the semantic model. You can reverse sort this using the Descending option.

  • You can also sort the dimensions alphabetically. In this case, all members are sorted alphabetically, breaking the hierarchy.

Here's an example showing the natural order of dimension sorting in a semantic model, i.e., Within a Hierarchy Ascending

You will see that the Sub_Category members are sorted in an alphabetically ascending manner while following the hierarchy defined in the Category. 

When you apply Alphabetical Ascending sorting, the members break away from their hierarchy and arrange themselves in an alphabetical manner.

As shown in the figure below, notice that the Sub_Category members are sorted alphabetically, irrespective of the Category.

Measure sorting

You can sort dimension members on the basis of measure data in the crosstab view in several ways. The following sections explain the methods in detail.

Measure sorting applied to the innermost dimension

This sorting is applied to the innermost dimension members. In case there are multiple dimensions (hierarchy or attribute) in rows, then only the innermost dimension members will be sorted by measure. Outer dimension measures would remain in their natural sorting order. In the case of hierarchy, all levels of dimension in view are sorted.

You can apply this sorting:

  • Without column headers

  • With column headers having contextual members

Example for without column headers

Here's what the crosstab shows without measure sorting:

In the following example, measure sorting (ascending) is applied. The values are sorted by only taking the context of the innermost dimension, i.e., category.

Note

The Segment is displayed in its default sorting order.

Example for With column headers having contextual members

Crosstab having column header without measure sorting:

Measure sorting having column header, sorted Country by Quantity in Ascending order by taking the context of Consumer (first member of the segment).

Measure sorting across dimensions (by breaking hierarchy)

This sorting breaks the hierarchy. With this non-hierarchical ordering, the members are arranged without reference to their position in the hierarchy. Use this option if you want the ascending or descending sorting arrangement not to be restricted within the parent members in the hierarchy. This enables you to analyze the entire data sorted only in ascending or descending manner. This sorting works outside the context of dimension/attribute in view by applying the sorting across dimensions.
When this sorting is applied, the crosstab view would automatically turn into a tabular view by repeating dimension member values for each row. Also, the option to expand a member of a hierarchy and show subtotals should not be visible in this case. Only grand totals can be displayed in case break hierarchy sorting is applied.

You can apply this sorting:

  • Without column headers

  • With column headers having contextual members

Examples of Without column headers

Here's what the crosstab shows without measure sorting:

Descending sorting across dimension (break hierarchy). Note that the Show expand collapse button is disabled, and the Repeat Member Values option is selected by default and cannot be edited. Member values for Segment and Category dimensions are repeated in each row.

Examples of With column headers having contextual members

Here's what the crosstab shows without measure sorting:

Measure sorting across dimensions having column header, Country, and Category dimensions sorted by Quantity in Descending order by taking the context of Consumer (first member of the segment). Note that the Show Expand Collapse Button is disabled, and the Repeat Member Values option is selected by default and cannot be edited. Member values for Country and Category dimensions are repeated in each row.

Note

Measure sorting is ignored if a member on which the sorting is applied is filtered out due to any filter condition.



Copyright Kyvos, Inc. All rights reserved.