Canvas data show is different

Hi All,
I want to show data STAMP/day

And this is my ES Query

SELECT count(labels.status::varchar) as Stamp FROM "apm-*" WHERE labels.status = 'STAMP' AND labels.tanggal = 'DATE(NOW())'

But why the result is 0, even though total stamp today is 12.
image

Anyone can help me?

Hi @salma_widiarti

Typically in Canvas this is caused by an additional filter being applied in your expression that you weren't expecting.

If you look at the expression for this metric (select the metric, select "Expression Editor" in the bottom right) you should see your expression starts with filters | essql ..... If you remove the filters | part from the beginning, no additional filters will be applied and it should only apply whatever filters are in your actual SQL query.

Hope that helps.

HI @corey.robertson

Thanks for your advice, it worked for me.

But why, when i change query like this

SELECT count(labels.status::varchar) as Stamp FROM "apm-*" WHERE labels.status = 'STAMP' AND labels.tanggal = 'YEAR()'

And i was remove the filters | the result still 0?

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