Count() with KQL doesn't return desired results

Hi There,

I'm using 7.15.

My elastic data are records of tests. Each test has status failed or pass.
I want to visualize a table like this:
Testcase Name | # of failed tests | %of failure from all runs

I tried to use count() function for both columns:
For number of failed column I used: count(kql='testcaseStatus.keyword:Failed') which give me 0 counts (I tried to sort it descending to see top values first, but still 0).

For the second column, I want to know the percent of failures tests from all runs. I did use count again: count(kql='testcaseStatus.keyword:Failed') / count(), and here I also get 0.

What am I doing wrong?

See settings:

=================================================================

I've removed the global filter (testcaseStatus.keyword: Failed) and set it as the one of the columns filter and it works as I expected. So this issue can be closed

2 Likes

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