Canvas: timefilter being ignored

Ok, this used to work somewhere in release 8.5 or before (I did not get around posting this for some months, at that moment I fixed the issue with a workaround, but I'm still puzzled about it)

timefilter column="timestamp" from="now/w" to="now/w" filterGroup="week"
| essql query="SELECT sum(revenue) as revenue FROM \"my-data\"" timeField="timestamp"
| math "revenue"
| metric "revenue" 
  metricFont={font size=48 family="'Open Sans', Helvetica, Arial, sans-serif" color="#000000" align="center" lHeight=48} 
  labelFont={font size=14 family="'Open Sans', Helvetica, Arial, sans-serif" color="#000000" align="center"} metricFormat="0,0.[000]"
| render

Whatever I put in the timefilter, I always get the total amount of revenue for everything in my Index, not filtered on the timefilter.

I have a Canvas running and it ran fine for ages this way and somewhere late last year it suddenly stopped working this way. So, what has changed in (I believe it was) 8.6?

I'm probably missing something obvious but it would be great if somebody enjoys pointing that out for me :smiley:

Thanks

Hi Jeroen. I think you are hitting this bug.

If you have a separate time filter element in your workpad, you can use that to filter your element instead.

For example, I'm using the Sample Web Logs dataset available in Kibana.

Here's the expression for my time filter control element.

timefilterControl compact=true column=timestamp filterGroup="time"
| render

I use that filter group in my metric element below.

kibana
| selectFilter group="time"
| essql query="SELECT sum(machine.ram) as ram_sum FROM \"kibana_sample_data_logs\""
| clog
| math "ram_sum"
| metric "ram_sum" 
  metricFont={font size=48 family="'Open Sans', Helvetica, Arial, sans-serif" color="#000000" align="center" lHeight=48} 
  labelFont={font size=14 family="'Open Sans', Helvetica, Arial, sans-serif" color="#000000" align="center"} metricFormat="0,0.[000]"
| render

Thanks for the reply

Yeah, I was afraid of that. The thing is that there are many different timefilters applied to different parts of the canvas (things like this week, last week, week before, etc). That means a handful of timefilterControls and I also don't want anyone changing them so they need to be hidden some way.

Any idea on when the bug will be fixed? @nickpeihl ?

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