How to select the top groups based on the relative occurence of a value in another variable

Dear,

Two variables in my dataset are important for this question namely : "Country_code" and "Tunnel_status". See example

Country_Code Tunnel_status
BE Up
NL Up
FR Down

BE Up
NL Up
FR Down

BE Up
NL Down
FR Up

What I wanted do to now is the following : the availability in BE was 100%, the one in NL was 66% and the one in FR was 33%. I want to filter on the countries with an availability lower then 33% so keep only France. The way how it is visualised is not so important for me, it should just be easy to see and to filter on the country codes with an availability lower then 33%.

Thanks in advance!

Kind regards,
Amon

Unfortunately I don't think you can accomplish exactly what you want here until Kibana supports bucket selectors: https://github.com/elastic/kibana/issues/11167

Alternatively, you could visualize this data and sort by availability ascending, but you would still see all of the data (even that above 33%) in the visualization.

1 Like

Dear Lukas,

First of all thank you for your answer, currently I'm doing this task in a Heatmap.

Metrics

  • Y-Axis
    Aggregation : count

  • Buckets

    • Split chart
      Aggregation : terms
      Field : VPN_BOX_LOCATION

    • X-axis
      Sub aggregation : Date Histogram
      Field : @Timestamp

-Split series
Sub aggregation
Field : Tunnel_Status

And then I have selected in Metrics and aces -> Y)aces -> mode percentages. This gives me a nice view but if I click on order by then it orders based on the count of occurences in a country and not on the percentage.

Kind regards,
Amon

Hey Lukas,

Maybe an important detail to add is that I have over 100 country codes.

Kind regards,
Amon

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