title: Splunk count 2 different fields with two different group by without displaying them
body: <p>I select <code>orderids</code> for a model in a subsearch and than select the most common materials for each orderid, so I get a list of every Material and the time it was a part of an order. I want to display the most common materials in percentage of all orders. So I need this amount how often every material was found and then divide that by total amount of orders.</p>
  
  <pre><code>sourcetype=file1 [subsearch... -&gt;returns Orders] | 
  </code></pre>
  
  <p>here I need to select the total amount of orders like:</p>
  
  <pre><code>stats dc(Orders) as totalamount by Orders|
  stats dc(Orders) as anz by Material|
  eval percentage= anz/totalamount|
  sort by percentage desc
  </code></pre>
  
  <p>How can I perform the total amount of search?</p>