Reduce NULL values when filtering with a single value with the Reporting API
search cancel

Reduce NULL values when filtering with a single value with the Reporting API

book

Article ID: 282729

calendar_today

Updated On: 06-19-2025

Products

CloudHealth

Issue/Introduction

The cleanest way to filter for a single value in the Reporting API is to not include the dimension containing the filter value and just include a filter clause for the dimension value you'd like.  This will greatly reduce the amount NULL data being returned. 

As an example if I wanted to filter for just September costs and still used "time" as a dimension I'd end up with null data for the other 11 months and a duplicate column of data representing the total.  If the "time" dimension is removed entirely and the "time" filter is left for September, I just have the data for that month without the data nests of nulls.  This also reduces the data size by an order of magnitude.

Resolution

Here is a call filtering for a single month. It returns an array of data that is mostly NULL and is 712 lines long:

Below is the same report after removing the time dimension.  This returns a single column of data and is 156 lines long: