<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to split count by product by another value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550281#M156152</link>
    <description>&lt;LI-CODE lang="markup"&gt;| stats list(*) as * by product&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 03 May 2021 21:20:40 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-05-03T21:20:40Z</dc:date>
    <item>
      <title>How to split count by product by another value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550269#M156147</link>
      <description>&lt;P&gt;Hi,&amp;nbsp; I have the following query:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| bin _time span=1d | stats count as ProductCount by applysourcetype, product, _time   

| where _time=relative_time(now(), "-d@d") or _time=relative_time(now(), "-8d@d")   

| eval when = if(_time=relative_time(now(), "-d@d"), "(Yesterday)", "(7 Days Ago)")  

| eval "Products Ordered {when}" = ProductCount    

| fields - _time ProductCount  when

| stats  values(*) as * by product , applysourcetype&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I'm getting following output:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="banana.PNG" style="width: 978px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14020iA6564B48471EDE7D/image-size/large?v=v2&amp;amp;px=999" role="button" title="banana.PNG" alt="banana.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can make product filed one row for unique product?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 20:01:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550269#M156147</guid>
      <dc:creator>maxmukimov</dc:creator>
      <dc:date>2021-05-03T20:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to split count by product by another value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550274#M156149</link>
      <description>&lt;LI-CODE lang="markup"&gt;| mvexpand product&lt;/LI-CODE&gt;&lt;P&gt;at the end of your search should do the trick. mvexpand docs &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.3/SearchReference/Mvexpand" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 20:24:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550274#M156149</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2021-05-03T20:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to split count by product by another value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550276#M156150</link>
      <description>&lt;P&gt;Getting the same results when I added&lt;/P&gt;&lt;PRE&gt;| mvexpand product&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 May 2021 20:33:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550276#M156150</guid>
      <dc:creator>maxmukimov</dc:creator>
      <dc:date>2021-05-03T20:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to split count by product by another value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550281#M156152</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats list(*) as * by product&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 May 2021 21:20:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550281#M156152</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-03T21:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to split count by product by another value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550419#M156204</link>
      <description>&lt;P&gt;got this&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="banana1.PNG" style="width: 918px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14036i2FD4C4EBCF0FE0C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="banana1.PNG" alt="banana1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 14:31:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550419#M156204</guid>
      <dc:creator>maxmukimov</dc:creator>
      <dc:date>2021-05-04T14:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to split count by product by another value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550422#M156206</link>
      <description>&lt;P&gt;One unique product per row - which is what you said. If this is not what you wanted, perhaps you can give an example of what you were expecting?&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 15:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550422#M156206</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-04T15:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to split count by product by another value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550442#M156210</link>
      <description>&lt;P&gt;&lt;SPAN&gt;From original query I’m getting something like this :&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.PNG" style="width: 640px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14043iD00B4C38B37D5064/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG" alt="1.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to get something like this: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.PNG" style="width: 638px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14044iB5D6D4CEC1C2CD65/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.PNG" alt="2.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 17:44:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550442#M156210</guid>
      <dc:creator>maxmukimov</dc:creator>
      <dc:date>2021-05-04T17:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to split count by product by another value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550498#M156219</link>
      <description>&lt;P&gt;The standard table view doesn't merge cells across rows. Using stats list(*) as * by product should at least group the fields into multi-value lists which is close to what you want.&amp;nbsp; If you still want separate rows for the counts, with blank entries in the product column for subsequent rows for the same product, you could use some CSS to hide them. This is a little fiddly to do but possible.&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 07:49:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-count-by-product-by-another-value/m-p/550498#M156219</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-05T07:49:37Z</dc:date>
    </item>
  </channel>
</rss>

