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

KB18008: How to perform null checking for a metric in the final pass of SQL in a report in MicroStrategy Developer


Stefan Zepeda

Salesforce Solutions Architect • Strategy


Generally, when null checking is used in metrics, the null checking is performed as part of the initial metric calculation. However, sometimes it is necessary to convert the null values to zeroes in the final pass.

Generally, when null checking is used in metrics, the null checking is performed as part of the initial metric calculation. However, sometimes it is necessary to convert the null values to zeroes in the final pass.
 
Follow the steps below to achieve this:
 

  • Create the original metric (M1) on which null checking is to be completed.
  • Create a dummy metric (M2) as Sum(0) at the report level along with another attribute.
     
    Note: It is not important whether the attribute is related to the report level attributes or not, only that its dimensionality is different from that of M1.
     
  • Create a compound metric (M3) as NullToZero(M1 + M2), as shown below:
ka02R000000kYA0QAM_0EM440000002EtK.jpeg
  •  
    NullToZero((M1 + ))
  • It may be necessary to enable smart metric calculation on M3, as shown below:
ka02R000000kYA0QAM_0EM440000002EtI.jpeg

Comment

0 comments

Details

Knowledge Article

Published:

June 9, 2017

Last Updated:

June 9, 2017