<?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 display specific fields in statistics? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-specific-fields-in-statistics/m-p/305538#M161052</link>
    <description>&lt;P&gt;Thanks Cusello!&lt;/P&gt;</description>
    <pubDate>Tue, 23 May 2017 01:07:20 GMT</pubDate>
    <dc:creator>wuming79</dc:creator>
    <dc:date>2017-05-23T01:07:20Z</dc:date>
    <item>
      <title>How to display specific fields in statistics?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-specific-fields-in-statistics/m-p/305536#M161050</link>
      <description>&lt;P&gt;References to tutorial &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchTutorial/Searchwithfieldlookups" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchTutorial/Searchwithfieldlookups&lt;/A&gt;, &lt;BR /&gt;
sourcetype=access_* status=200 action=purchase [search sourcetype=access_* status=200 action=purchase | top limit=1 clientip | table clientip] | stats count AS "Total Purchased", dc(productId) AS "Total Products", values(productId) AS "Products ID" BY clientip | rename clientip AS "VIP Customer" will display 4 fields, "VIP Customer", "Total Purchases", "Total Products" and "Product ID". &lt;/P&gt;

&lt;P&gt;How do I show also the Product Name in this search?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:09:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-specific-fields-in-statistics/m-p/305536#M161050</guid>
      <dc:creator>wuming79</dc:creator>
      <dc:date>2020-09-29T14:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to display specific fields in statistics?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-specific-fields-in-statistics/m-p/305537#M161051</link>
      <description>&lt;P&gt;HI wuming79,&lt;BR /&gt;
where is Product_Name field?&lt;/P&gt;

&lt;P&gt;if it's in your index, you can add to your stats command also: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;values(Product_Name) AS Product_Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if instead it's in a lookup, you have to add a row before the stats command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_ status=200 action=purchase 
[search sourcetype=access_ status=200 action=purchase | top limit=1 clientip | table clientip] 
| lookup products.csv  productId OUTPUT Product_Name 
| stats stats count AS "Total Purchased", dc(productId) AS "Total Products", values(productId) AS "Products ID" values(Product_Name) AS Product_Name BY clientip | rename clientip AS "VIP Customer".
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For performance, I always prefer to insert index in my main search.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 12:49:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-specific-fields-in-statistics/m-p/305537#M161051</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-05-22T12:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to display specific fields in statistics?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-specific-fields-in-statistics/m-p/305538#M161052</link>
      <description>&lt;P&gt;Thanks Cusello!&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 01:07:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-specific-fields-in-statistics/m-p/305538#M161052</guid>
      <dc:creator>wuming79</dc:creator>
      <dc:date>2017-05-23T01:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to display specific fields in statistics?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-specific-fields-in-statistics/m-p/305539#M161053</link>
      <description>&lt;P&gt;HI wuming79,&lt;BR /&gt;
if you're satisfied of this answer, please accept it.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 08:56:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-specific-fields-in-statistics/m-p/305539#M161053</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-05-23T08:56:44Z</dc:date>
    </item>
  </channel>
</rss>

