Back to ITRS Internal Only FAQ

Internal documentation only

This page has been marked as draft.

Toolkit | How to count number of occurrences of given value in output

To achieve this, you need to set up two separate headlines. After creating a new headline cell, you can configure a gateway rule to show the number of rows through the count() statistical function. Statistical functions help to make data more relevant by providing summary data rather than raw data.

Problem Copied

I have a sampler (toolkit) that returns an output table. In the headline, I want to count the number of “attached” and “detached” occurrences within the “PVC state” column. Could you please guide me on how to achieve this?

Geneos - Toolkit | How to count number of occurrences of given value in output.

Possible solution(s) Copied

Final Output Snippet

Geneos - Toolkit | How to count number of occurrences of given value in output.

As you can see above, I managed to count the attached and detached. The steps below show how to achieve that.

  1. Create the headlines here:

Geneos - Toolkit | How to count number of occurrences of given value in output.

  1. I made two different rules for the attached and detached.

Geneos - Toolkit | How to count number of occurrences of given value in output.

  1. Create “path aliases” for attached and detached.
  1. Copy the path of your headline (attached and detached).
  1. Paste it into the Target field
  1. Apply the rule that comes from this article - https://support.itrsgroup.com/hc/en-us/articles/115004029789-Geneos-How-do-I-get-the-total-number-of-rows-returned-in-a-rule-rowcount

Note: Please change the variables based on what you declared on the “PathAliases”

Then you can check how many counts are in the attached and detached. During testing:

Complete view - Tried to add the word “detached.”

Geneos - Toolkit | How to count number of occurrences of given value in output.

Will replace the last detached with the attached.

Geneos - Toolkit | How to count number of occurrences of given value in output.

["Geneos"] ["FAQ"]

Was this topic helpful?