Able to Calculate Metrics, Unable to Visualize as Graphs [beginner]

I'm new to Kibana, and I can't seem to figure out a completely trivial thing. Can you please point me in the right direction? I tried searching & googling, but I was not able to move on for more days.

Minimal working example:

data

sentence article is_about_cat
Cat drinks milk. A YES
Dog drinks milk. A NO
I love you. B NO
You love me. B NO
Cat is an animal. C YES
Sky is blue. C NO
Blood is red. C NO
I don´t know. D NO
You don't know. D NO

What I want:
I want to know how many articles are about cats = have at least one sentence that has "YES" in "is_about_cat" column. (Which is true for 2 articles in the example data, A & C.)

The visualization I can do (if I am not wrong):
Use metrics and show the number/percentage of articles that contain a sentence about a cat.

visualization -> metrics
unique_count('article.keyword', kql='is_about_cat:"YES"')

unique_count('article.keyword', kql='is_about_cat:"YES"') / unique_count('article.keyword')

The visualization I want and don't know how to do:
I want to visualize the proportion and have a graph:

I can only do this graph for sentences (each line in the table). I tried visualisation & aggregation based visualisation, but I was not able to get to the right numbers.

How can I make this visualization?

Thank you for your time & help. :slight_smile:

(Edited after more testing.)

I think that asking here and giving up on the issue gave my brain the strength to better define what threw me off here and made me think it is not possible.

When I do:

  1. visualisation -> chart
  2. slice by: is_about_cat
  3. size by: unique_count('article.keyword')

It is quite close, but it shows: number of articles with at least one sentence with "YES" and numbers of "articles where there is at least one sentence with "NO in the is_about_cat column. (If I am not wrong.)

But I want number of articles with at least one sentence with "YES" and the rest...

How can I do that?

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