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

KB439226: How to create a filtered metric using a case statement in Visual Insight in MicroStrategy Web 10.x


Community Admin

• Strategy


How to create a filtered metric using a case statement in Visual Insight in MicroStrategy Web 10.x

INTRODUCTION
This article describes how to create a metric with an attribute as a filter using a Case statement in a Visual Insight dashboard in Strategy Web. 
Content
In order to create a metric in Strategy Visual Insight to filter on a specific attribute, a Case statement function can be used to get the designed results. 

ka04W000000ObfyQAC_0EM44000000QBZb.png

Syntax
Sum(IF((Attribute@ID=Element),Metric,0)){}
Where: 

  • Attribute is the attribute being used as a filter 
  • Element  is the specific element being filtered on
  • Metric is the base metric being used 

REPRODUCING STEPS IN TUTORIAL
1. Create a new derived metric in a VI Dashboard with the formula below: 
Sum(IF((Year@ID=2014),Cost,0)){}
 

ka04W000000ObfyQAC_0EM44000000QBZu.png

2. Add the new derived metric to the grid as shown below: 
 

ka04W000000ObfyQAC_0EM44000000QBZz.png

KB439226


Comment

0 comments

Details

Knowledge Article

Published:

December 14, 2017

Last Updated:

December 28, 2018