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

KB19495: Report filter is not ignored in the metric calculation if one of the attributes of a hierarchy included has a many-to-many relationship in MicroStrategy Developer 10.x.


Stefan Zepeda

Salesforce Solutions Architect • Strategy


This article explains a specific scenario which will cause a report filter not to be ignored in the calculation of a level metric despite the metric level setting

SYMPTOM:
A user executes a report with the following conditions in Strategy Desktop 8.x:
 

  • Contains a metric with a Hierarchy included in the level, with the 'Remove related report filter elements' option checked, as shown below:
ka02R000000kWVxQAM_0EM440000002Ejw.jpeg
  • One of the attributes that belongs to the hierarchy has a many-to-many relationship (M:M) with another attribute, as shown below:
ka02R000000kWVxQAM_0EM440000002Ejz.jpeg
  • Contains a report filter (can be based on a hierarchy prompt) based on the attribute described, as shown below:
ka02R000000kWVxQAM_0EM440000002Ek1.jpeg

Incorrect results are returned. When checking the SQL of the report, users notice that the report filter is being applied to the calculation of the metric, as shown below:
 

ka02R000000kWVxQAM_0EM440000002Ejk.jpeg

Users may notice that using a one-to-many relationship for this attribute removes the report filter successfully.
 
CAUSE:
This is working by design. In this example, the Location Group attribute filter is removed when using the 1:M relationship because of the metric 'Remove related report filter elements` option. Since there are Geography hierarchy attribute filters in the metric conditionality, Strategy determines that the Location Group filter can be safely be ignored.
 
In the M:M relationship, both attribute's IDs are considered independent keys. Since the Location Group ID is an independent key, Strategy determines that it might no be safe to remove the filter conditions, and applies all the filters to the metric calculation.
 
WORKAROUND:
If users want to force Strategy to ignore this filter in the metric calculation, two possible workaround might be followed:
 

  1. Create a relationship filter. Instead of filtering on the attribute directly, create a relationship filter with the Output level set to the attribute and the Hierarchy prompt as the filter. The filter is dropped when using a relationship filter this way
  2. Use a `dummy' filter in the conditionality of the metric, based on the attribute with the M:M relationship (like <attribute> is not NULL). This will make Strategy consider the filter as related and will remove it as well.

Comment

0 comments

Details

Knowledge Article

Published:

June 30, 2017

Last Updated:

June 30, 2017