Skip to Content
Author's profile photo Nikhil Sabnis

How to hide null values from the x-axis of a graph?

If there are null values in the data and if this data is referred by a Chart in the report as X-axis scale then the null value appears in the chart. The below steps will explain how to suppress/hide the null values from the chart.

1. Suppose we have data as below:


2. Create 2 formulas as below in the report:


stringVar DD;
stringVar MM;
stringVar YYYY;


DD &”-“& MM &”-“& YYYY;



3. When you Create a chart based off this data and using the formulas created in Step 2 then the chart will look like:

Original Report.JPG

One can easily spot the null value in the Legend and in the chart. It is highlighted in RED in the chart.

Note: I am using “Do Not Summarize” optoin for the “Points” formula, in the Chart Expert.

4. We need to find the maximum date within all the dates in our sample data. This can be easily done in any relational database. Include the maximum date as an additional column and repeat this value for all the rows. Please refer the snap-shot below:

Updated Base-Data.JPG

5. Update the dates formula created in Step 2, with the code below:

stringVar DD;
stringVar MM;
stringVar YYYY;
dateTimeVar Dates;

If IsNull({Sheet6_.Date}) Then


DD &”-“& MM &”-“& YYYY;

6. If you refresh the report now, then NULL value appearing in the chart will disappear. Refer the snap-shot below:

Updated Report.JPG

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.