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

KB17673: How to force data labels to show null values as zeros in a graph report or visualization within a dashboard in MicroStrategy 2021 or later


Stefan Zepeda

Salesforce Solutions Architect • Strategy


This knowledge base article explains how to force data labels to show null values as zeros in a graph report or visualization within a dashboard.

Symptom:

The procedure below describes how to modify data labels to present null values as zeros in a graph report or visualization within a dashboard.
 

Steps to Reproduce:

Follow the steps below to reproduce this behavior:

  • In the Strategy Tutorial project, create a grid visualization within a dashboard with the attributes Category and Year and the metric Revenue, as shown in the image below:
     
ka0PW00000021BJYAY_0EMPW000005rWrh.jpeg
  • Note: Books doesn't have data for Year 2014, but the grid was manipulated to display the null value.
     
  • Change the visualization to a clustered bar chart. Observe the revenue for category Books for the year 2014 is not displayed. 
ka0PW00000021BJYAY_0EMPW000005rXW1.jpeg

 

Cause:

This is expected behavior. Data labels don't display null values in a graphical representation in reports and dashboard visualizations. Therefore there are no labels for 2014 data for category Books. 
 

Action:

A user may find it useful to display zeros instead. In order to achieve this, create a derived metric using the NullToZero function as shown in the image below:

ka0PW00000021BJYAY_0EMPW000005rDU7.jpeg

NullToZero(Revenue)
Use this metric in the graph instead of the Revenue metric and run the dashboard, as shown below:
 

ka0PW00000021BJYAY_0EMPW000005rPa6.jpeg

Notice how even though there is no bar for Books 2014, the graph's data label still appears showing a value of Zero.
The same steps can be followed to display null data labels in a graph report.
Additionally, the availability of graph view in reports is not present in Workstation and Library. To incorporate graphs, it is necessary to create a dashboard.


Comment

0 comments

Details

Knowledge Article

Published:

June 6, 2017

Last Updated:

May 10, 2024