--- id: fillmissing title: fillmissing Metrics Operator sidebar_label: fillmissing description: Use the fillmissing metrics operator to fill empty time slices in query results with derived data points, preventing straight-line interpolation in visualizations. slug: /help/docs/metrics/metrics-operators/fillmissing/ canonical: https://www.sumologic.com/help/docs/metrics/metrics-operators/fillmissing/ --- import useBaseUrl from '@docusaurus/useBaseUrl'; If a metric query returns results with empty timeslices, the visualization contains a straight line between the data points on either side of the empty timeslice(s). You can use the `fillmissing` operator to fill empty time slices in metric query results with a derived data point. You can choose between several methods of deriving a data point, or leave empty timeslices empty. ## Syntax ```sql fillmissing [using] ``` Where `` is one of: * `empty`. No data point is derived, and the visualization is discontinuous. * `interpolation`. The derived data point is a linear interpolation of the data points prior to and after the empty time slice(s). * `last`. The derived data point is the same value as the previous data point. * ``. With this option, you supply a fixed value, for example “50”, and the derived data point will have that value. ## Query without fillmissing The chart in this section shows metric query results without the `fillmissing` operator. ```sql _sourceCategory=Labs/VMWare6.5/Metrics hostname=thisveryhost metric=cpu_ready ``` ### Example 1: fillmissing empty The chart in this section shows metric query results with the `fillmissing` operator with the `empty` option. Note that empty time slices are not filled with a derived data point.  ```sql _sourceCategory=labs/aws/host/metrics metric=CPU_Idle | avg by _sourcename | fillmissing empty ``` fillmissing empty ### Example 2: fillmissing interpolation The chart in this section shows metric query results with the `fillmissing` operator with the `interpolation` option. Note that empty time slices are filled with a derived data point whose value is a linear interpolation of the data points prior to and after the empty time slice.  ```sql _sourceCategory=labs/aws/host/metrics metric=CPU_Idle | avg by _sourcename | fillmissing interpolation ``` fillmissing empty ### Example 3: fillmissing last The chart in this section shows metric query results with the `fillmissing` operator with the `last` option. Note that empty time slices are filled with a derived data point whose value is the value of the metric from the previous time slice. ```sql _sourceCategory=Labs/VMWare6.5/Metrics hostname=thisveryhost metric=cpu_ready | fillmissing last ``` fillmissing empty ### Example 4: fillmissing with fixed value The chart in this section shows metric query results with the `fillmissing` operator with a constant value of 0. Note that empty time slices are filled with a data point whose value is 0. ```sql _sourceCategory=labs/aws/host/metrics metric=CPU_Idle | avg by _sourcename | fillmissing 0 ``` fillmissing empty