title: Divide the count of two search texts
body: <p>When I search &quot;SearchText1&quot; then lets say there are 20 records.</p>
  <p>When I search &quot;SearchText2&quot; then there are 10 results</p>
  <p>Then I need to display a single value &quot;2&quot; in the dashboard</p>
  <p>How do I formulate the Splunk query?</p>
  <p>I tried below query where the numerator count is evaluated correctly but something is wrong with the denominator count related part:</p>
  <pre><code>index=something &quot;searchText1&quot; 
  | stats count as NumeratorCount 
  | eval numerator=NumeratorCount
  | append [ | search index=something &quot;searchText2&quot; 
    | stats count as DenominatorCount 
    | eval denominator=DenominatorCount ]
  | eval result=round(if(denominator=0,0,numerator/denominator), 2)
  | table result
  </code></pre>