To specify a default handling for values within queries, see the documentation.

    The FILL keyword expects a single fillOption strategy which will be applied to each aggregate column. The following restrictions apply:

    fillOptionDescription
    NONENo fill applied. If there is no data, the time chunk will be skipped in the results. This means your table could potentially be missing intervals.
    Fills with NULL
    PREVFills using the previous value
    LINEARFills by linear interpolation of the 2 surrounding points
    xFills with a constant value - where x is the desired value, for example FILL(100.05)

    Examples

    Consider an example table named prices which has no records during the entire third hour ():

    tsprice
    2021-01-01T10:00:00.000000Zp1
    2021-01-01T11:00:00.000000Zp2
    2021-01-01T12:00:00.000000Zp3
    2021-01-01T14:00:00.000000Zp4
    2021-01-01T15:00:00.000000Zp5

    The returned results look like this:

    As there are missing values, an average aggregate cannot be calculated for the missing hour:

    tsminmaxaverage
    2021-01-01T10:00:00.000000Zmin1max1avg1
    2021-01-01T11:00:00.000000Zmin2max2avg2
    2021-01-01T12:00:00.000000Zmin3max3avg3
    2021-01-01T14:00:00.000000Zmin5max5avg5

    Based on this example, a FILL strategy can be employed which fills with the previous value using PREV:

    This query returns the following results where the fourth row is created by using the FILL keyword:

    tsminmaxaverage
    2021-01-01T10:00:00.000000Zmin1max1avg1
    2021-01-01T11:00:00.000000Zmin2max2avg2
    2021-01-01T12:00:00.000000Zmin3max3avg3
    2021-01-01T13:00:00.000000Zmin3max3avg3
    2021-01-01T14:00:00.000000Zmin5max5avg5

    The results of this query look like the following:

    This query demonstrates using a constant value as a fillOption. If a constant value is used as a fillOption, a value must be specified for each aggregate column:

    The results of this query look like the following:

    tsminmaxaverage
    2021-01-01T10:00:00.000000Zmin1max1avg1
    2021-01-01T11:00:00.000000Zmin2max2avg2
    2021-01-01T12:00:00.000000Zmin3max3avg3
    2021-01-01T13:00:00.000000Z100.5101
    2021-01-01T14:00:00.000000Zmin5max5avg5

    This query demonstrates using NULL as a :

    tsminmaxaverage
    2021-01-01T10:00:00.000000Zmin1max1avg1
    2021-01-01T11:00:00.000000Zmin2max2avg2
    2021-01-01T12:00:00.000000Zmin3max3avg3
    2021-01-01T13:00:00.000000Znullnullnull
    2021-01-01T14:00:00.000000Zmin5max5avg5