CloudWatch uptime in Grafana: NoData as downtime, but ignore period before target group existed

Hi,

I’m calculating uptime for AWS ALB Target Groups in Grafana using CloudWatch.

My logic is:

NoData after the target group exists → downtime
(this is intentional and required for SLA)

Example query:

FILL(
  SEARCH(
    '{"AWS/ApplicationELB","LoadBalancer","TargetGroup"}
     MetricName="HealthyHostCount"
     "LoadBalancer"="${loadbalancer}"',
    'Minimum',
    $__period_auto
  ),
  0
)

This works correctly once the service exists.


The open question

How to correctly handle NoData before the target group existed?

I see two acceptable options:

Option 1
NoData before the target group existed → ignored
NoData after the target group exists → downtime

Option 2
Do not show or evaluate any data before a fixed start date
(e.g. 2026-01-01), and calculate uptime only after that.


Question

Is there any CloudWatch-side way (Metric Math, SEARCH, Metrics Insights, etc.) to support Option 1?

Or is controlling the panel/dashboard time range effectively the only realistic approach, making Option 2 the correct solution in practice?

Thanks!