How to write query in Dev tools to find expired date of customers by comparing current date?

@timestamp was an example because my data set doesn't have an expiry_date field.

For the pie chart use a filters aggregation for the buckets and use these three KQL filters:

  • expiry_date > now (label "Active")
  • expiry_date <= now (label "Inactive")
  • NOT expiry_date: * (label "N/A")

For the metric use count