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

KB298583: Custom subtotals with the First(x) and Last(x) functions are not calculated correctly when sorted by a hierarchy in MicroStrategy Secure Enterprise 10.x


Community Admin

• Strategy


This article notes an issue with custom subtotals using first or last

SYMPTOM
Custom subtotals that contain the First(x) Last(x) functions ignore the sort definition and instead sort by the metric value when sorted by hierarchy.
 
STEPS TO REPRODUCE:

  • Create a custom subtotal defined as follows: LastH = Last <SortBy=(Time)>(x){@, Year, Quarter, Month}, here Time refers to the Time Hierarchy
  • Create a metric CostH = Sum(Cost) {~}, select LastH as one available subtotal for this metric
ka04W000000OhD8QAK_0EM440000002C1q.jpeg
  • Create a normal report with Year, Quarter, Month and CostH, and enable the subtotal LastH.  For 2010Q1, the last metric is 469,412 when sorted by time, but the subtotal value is incorrectly shown as 502,767.
ka04W000000OhD8QAK_0EM440000002C1t.jpeg

 
CAUSE
This is a known issue in Strategy 10.x that has been logged with the internal reference ID DE29996.  
 
WORKAROUND
Define the custom subtotal without the hierarchy and instead use the component attributes e.g. Last <SortBy=(Year, Quarter, Month)>(x){@, Year, Quarter, Month}
 
ACTION
This issue has been fixed in Strategy Secure Enterprise 10.4. Upgrade to this version to take advantage of the fix. 
 


Comment

0 comments

Details

Knowledge Article

Published:

May 30, 2017

Last Updated:

May 30, 2017