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

KB439937: How to create an OLAP function derived metric that will calculate without regard to filtering applied at the visualization level in a Visual Insight dashboard in MicroStrategy 10.x


Frederick Kellerman

Cloud Support Expert I • MicroStrategy


This article discusses how to create an OLAP function derived metric in a VI dashboard that will calculate based on the data contained in the visualization prior to a filter being applied in the visualization.

DISCUSSION
Consider a scenario where a user wants to create a derived metric containing the OLAPAvg function in a VI dashboard that will calculate the moving average starting at 4 rows before the current row and stopping at the current row. The image below shows a dashboard containing the Month attribute, Revenue metric, and the OLAPAvg derived metric.

ka02R000000kV0PQAU_0EM44000000A3Te.png

Now assume that the user adds a filter to only show the row for August 2014. Note that the OriginalOLAPAvg metric recalculates based on the rows currently displayed in the visualization as seen in the image below. Since Aug 2014 is the only row displayed the Revenue for Aug 2014 is the only value used in the calculation of the OLAPAvg metric. The rows that have been filtered out are no longer used in the calculation of the metric.

ka02R000000kV0PQAU_0EM44000000A3Tt.png

This behavior is seen because filters in a visualization are applied prior to the calculation of derived metrics. In some cases users may want to include the pre-filtered rows in the calculation of the OLAPAvg metric in which case the following steps can be used
STEPS TO CREATE THE METRIC
1) Create a new derived metric from the Revenue metric. Define the metric as Sum(Revenue).In the derived metric editor set the Level options to Ignore the report filter​

ka02R000000kV0PQAU_0EM44000000A3UD.png

 
2) Create an OLAPAvg derived metric using the derived metric created in step 1 as the base metric. In the Metric Options editor change the "Aggregation and Subtotal Behavior" to Manual and check the box for "Aggregate From Base.
This will cause the the calculation of the OLAPavg metric to ignore the filter set in the dashboard. The metric will now calculate as desired.

ka02R000000kV0PQAU_0EM44000000A3Uw.png

  KB439937


Comment

0 comments

Details

Knowledge Article

Published:

March 14, 2018

Last Updated:

December 28, 2018