EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB8453: What is the custom group sorting feature available in MicroStrategy Developer 9.4.x?


Stefan Zepeda

Salesforce Solutions Architect • Strategy


What is the custom group sorting feature available in MicroStrategy Developer 9.4.x?

This document explains the sorting feature for custom groups in Strategy Developer 9.4.x . This sorting feature can be accessed from the Data > Advanced Sorting dialog in the Report Editor of Strategy Developer 9.4.x.
 
For example, consider a report with a custom group defined as shown below (the examples are based on the Strategy Tutorial project):
 

ka044000000kIvsAAE_0EM440000002G6q.jpeg

 
Its elements have the following display options:
 

ka044000000kIvsAAE_0EM440000002G6t.jpeg

 
The custom group options are set as follows:
 

ka044000000kIvsAAE_0EM440000002G70.jpeg

 
Upon running a report with this custom group and the metric, the following data is displayed:
 

ka044000000kIvsAAE_0EM440000002G6d.jpeg

 
Note that the individual items within each grouping are sorted by their IDs in ascending order. This is more clearly demonstrated in the following report where the first column under Supplier is the ID of the Supplier elements:
 

ka044000000kIvsAAE_0EM440000002G6v.jpeg

 
In Strategy Developer 9.4.x, the report developer can define different types of sorting for custom groups as shown in the examples below:
 

  • Sorting customer group items by ID in descending order
    To sort individual items by ID in descending order, open the advanced sorting dialog in design or grid view in the report editor. Add a sort on the custom group as shown:
     
ka044000000kIvsAAE_0EM440000002G6o.jpeg
  •  
    The result in Strategy Developer 9.4.x will be as follows:
     
ka044000000kIvsAAE_0EM440000002G6f.jpeg
  • Sorting by inheriting the default sort of an attribute
    Consider an attribute that has a default sort set on description in ascending order as in the following case with the attribute Promotion Type.
     
ka044000000kIvsAAE_0EM440000002G6R.jpeg
  •  
    Consider a custom group defined as follows:
     
ka044000000kIvsAAE_0EM440000002G74.jpeg
  •  
    If this feature is not implemented, the results appear as shown below. Note that the items are sorted without considering the default sort order specified for the attribute:
     
ka044000000kIvsAAE_0EM440000002G6V.jpeg
  •  
    To inherit the default sort of the attribute called Promotion Type, choose the last option (Inherit Attribute Sort) in the advanced sorting dialog as shown below:
     
ka044000000kIvsAAE_0EM440000002G6T.jpeg
  •  
    Strategy Developer will then return data as follows for that report:
     
ka044000000kIvsAAE_0EM440000002G72.jpeg
  • Sorting by metrics within custom groups.
    Consider a report with the custom group called CG_160870 (as specified earlier) and a metric . If the report is sorted by the metric, the group structure is not maintained by default, as shown in the following result:
     
ka044000000kIvsAAE_0EM440000002G6w.jpeg
  •  
    To retain the group structure while sorting on metrics, specify the "Keep group structure" option for the custom group before making the metric sorting specification. This setting is available in the advanced sorting dialog as shown:
     
ka044000000kIvsAAE_0EM440000002G6X.jpeg
  •  
    This will result in the following data in Strategy Developer 9.4.x:
     
ka044000000kIvsAAE_0EM440000002G6y.jpeg
  •  
    In the example above, note that the custom group element EL1 remains above EL2 even though metric values of EL1 are greater than the metric values of EL2. This is expected behavior because in the process of retaining group structure, the sorting specification for a custom group applies only to the lowest level individual items and not to the elements themselves. In other words, while keeping group structure, the order of the custom group elements will remain exactly as it is defined in the custom group editor and the sorting by metric values will only apply to individual items within the custom group.


KB8453


Comment

0 comments

Details

Knowledge Article

Published:

June 9, 2017

Last Updated:

December 31, 2018