Bar chart Visualisation

{
  "aggs": {
    "3": {
      "terms": {
        "field": "Client.keyword",
        "order": {
          "_key": "asc"
        },
        "size": 2000
      },
      "aggs": {
        "2": {
          "date_histogram": {
            "field": "@timestamp",
            "calendar_interval": "1d",
            "time_zone": "Europe/Paris"
          },
          "aggs": {
            "1": {
              "serial_diff": {
                "buckets_path": "1-metric"
              }
            },
            "1-metric": {
              "sum": {
                "field": "Job_Size(GB)"
              }
            }
          }
        }
      }
    }
  },
  "size": 0,
  "fields": [
    {
      "field": "@timestamp",
      "format": "date_time"
    },
    {
      "field": "Backup_Date",
      "format": "date_time"
    }
  ],
  "script_fields": {},
  "stored_fields": [
    "*"
  ],
  "runtime_mappings": {},
  "_source": {
    "excludes": []
  },
  "query": {
    "bool": {
      "must": [],
      "filter": [
        {
          "match_all": {}
        },
        {
          "range": {
            "@timestamp": {
              "gte": "2021-08-07T11:19:23.944Z",
              "lte": "2021-08-09T11:19:23.944Z",
              "format": "strict_date_optional_time"
            }
          }
        }
      ],
      "should": [],
      "must_not": []
    }
  }
}

I would like to exclude all the terms "field": "Client.keyword" corresponds to 0.

I'm not 100% what you want to archive but I guess you want to exclude records that contain Client.keyword set to 0 ? Or whose Client.keyword is not set? In either case you could use a filter for that case.

Best,
Matthias

Hello @matw,
Thanks for your reply . I would like to remove all the client.keywords which corresponds to the value 0. The graph can show only client.keywords which corresponds the serial difference value except 0. After the serial difference aggregation, I would like to show only client. keywords which consist the value (non 0).
Thanks a lot in advance

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.