IBM Cloudability

Cloudability

A place for Cloudability product users to learn, connect, share and grow together.


#Cloudability
#Automation
#FinOps
#Cloud
#Apptio
#ITAutomation
 View Only

Differentiating Zero vs. Null Values in Resource Inventory Metrics

  • 1.  Differentiating Zero vs. Null Values in Resource Inventory Metrics

    Posted 23 hours ago

    Overview

    Cloudability is enhancing the resource inventory metrics to improve data accuracy and customer analysis capabilities. We're introducing null value representation and a new IS NULL filter operator to distinguish between "no data available" and "actual zero values". This is a critical distinction that may impacts the accuracy of customer analytics.

    Key Problem Solved: Previously, metrics with no data were indistinguishable from zero values, causing customers' exported data and calculations to be systematically inaccurate. One documented case showed this issue artificially reducing average memory utilization calculations from 28% to 13%.

    The Problem: Zero vs. Null Ambiguity

    Current Limitation

    When the resource inventory API returns { "cpu_utilization": 0 }, it's not possible to know if this means:

    • Actual measurement: CPU utilization is genuinely 0%
    • Missing data: No CPU utilization data is available for that resource

    This ambiguity cascades into customer workflows:

    1. Resource Inventory Data Export: Resources without metric data appear as 0 in CSV exports
    2. Incorrect Calculations: Customers calculate averages that include these artificial zeros, skewing results downward
    3. No Filtering Option: No way to identify resources with data quality issues
    4. Business Impact: One customer's analysis showed memory utilization calculations dropping from ~28% to ~13% when zero values for missing data were included in the average

    The Solution: Null Values + IS NULL Operator

    Part 1: Null Representation

    In API: Metrics with no available data will now return null instead of 0:

    Before:

    {
      "cpu_utilization": 0,
      "memory_utilization": 0,
      "unblended_cost": 0
    }

    After:

    {
      "cpu_utilization": null,        // No data available
      "memory_utilization": 25.5,     // Actual measured value
      "unblended_cost": 0             // Actual zero cost
    }

    In UI: Metrics with no available data will show the value as 'N/A'. 

    In CSV Export: Metrics with no available data will show the value as 'Not Available'. 

    Part 2: IS NULL Filter Operator

    A new filter operator lets you explicitly search for null or non-null metrics. This operator applies only to metrics, not dimensions (string fields) and available on both UI and API. 

    metric IS NULL true - Find Missing Data

    Returns only records where the specified metric has no data:

    cpu_utilization IS NULL true

    Results: All resources where CPU utilization data is unavailable

    metric IS NULL false - Find Complete Data

    Returns only records where the specified metric has a value (including zero):

    memory_utilization IS NULL false

    Results: All resources with available memory utilization data (whether measured at 0% or higher)

    Use Cases

    1. Data Quality Analysis

    Identify resources with incomplete metric coverage:

    memory_utilization IS NULL true AND cpu_utilization IS NULL false

    Results: Resources with CPU data but missing memory data (potential data collection issue)

    2. Accurate Aggregations

    Calculate average CPU utilization only for resources with data:

    cpu_utilization IS NULL false

    Export these results → Calculate average → No artificial zeros skewing the result

    3. Cost Analysis Filters

    Combine IS NULL with existing operators:

    (unblended_cost IS NULL false) AND (unblended_cost > 100)

    Results: Resources with actual cost data > $100 (excludes unknown/unmeasured costs)

    Technical Highlights

    Backward Compatibility

    • Existing comparison operators unchanged: metric==0 still matches only actual zeros, automatically excluding nulls
    • Sorting behavior preserved: Default descending sort shows resources with data first, null values appear last
    • Dimensions unaffected: String fields work exactly as before

    Error Handling

    The system provides clear error messages:

    Scenario Error Response
    Use IS NULL on a dimension field 400 Bad Request: "IS NULL operator is only supported for metrics, not dimensions"
    Missing value parameter 400 Bad Request: "IS NULL operator requires value: true or false"
    Invalid value (not true/false) 400 Bad Request 

    Sorting Behavior

    • Ascending (ASC): Null values appear first, then sorted values
    • Descending (DESC): Sorted values appear first, null values at end
    • Default UI behavior: Metrics sorted descending by default, so resources with complete data display first

    Impact & Benefits

    ✓ Accurate Analysis: Distinguish between missing data and zero values
    Correct Calculations: Exports no longer include artificial zeros in averages
    Better Insights: Identify data quality issues proactively
    Data Governance: Track which resources have complete vs. incomplete metric coverage

    Availability

    This enhancement will be available in the resource inventory UI and API on Aug 18th



    ------------------------------
    Alok Jain
    ------------------------------