Specify date histogram offset in Kibana


(Mandycoston) #1

Hi,

How can I specify the date histogram offset for a data table visualization in Kibana? The week aggregations start are Monday-Monday but I'd like Sunday-Sunday.

I tried putting this in the json input

{
"aggs": {
"by_week": {
"date_histogram": {
"field": "kPublishDate",
"interval": "week",
"offset": "-1d"
}
}
}
}

I'm getting this error: Visualize: Unknown key for a START_OBJECT in [2]: [aggs].

How can I change the offset for the date histogram?

Thanks!


(Brandon Kobel) #2

Hey @mandycoston, you should be able to specify the following JSON Input: { "offset": "-1d" }


(Mandycoston) #3

Thank you!!


(system) #4

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