<?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: Chart and table of occurences of field by another field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322437#M96276</link>
    <description>&lt;P&gt;oh yes, because my log contains field data which contains titleID and orderID so to get them it's data.titleID and data.orderID&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jan 2018 10:04:44 GMT</pubDate>
    <dc:creator>swdowiarz</dc:creator>
    <dc:date>2018-01-22T10:04:44Z</dc:date>
    <item>
      <title>Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322432#M96271</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I would like to have some chart ( bar etc.) and table of logs which contain two information titleID and userID.&lt;BR /&gt;
I would like to have table and chart of each user and sum of each titleID for him. &lt;/P&gt;

&lt;P&gt;I'm using this search, but I'm not sure about it: &lt;/P&gt;

&lt;P&gt;... | top "data.titleID" by "data.userID" | table "data.userID" "data.titleID" count&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 09:17:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322432#M96271</guid>
      <dc:creator>swdowiarz</dc:creator>
      <dc:date>2018-01-22T09:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322433#M96272</link>
      <description>&lt;P&gt;Hi swdowiarz,&lt;BR /&gt;
hi did you already tried with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| stats sum(titleID) AS titleID BY userID
|  sort -titleID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;?&lt;BR /&gt;
if in addition you like to have only the first 10 top values you can add tho the above search &lt;CODE&gt;| head 10&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 09:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322433#M96272</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-01-22T09:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322434#M96273</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I don't know why  but SUM(titleID) does not work for me, I don't know why  &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 09:40:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322434#M96273</guid>
      <dc:creator>swdowiarz</dc:creator>
      <dc:date>2018-01-22T09:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322435#M96274</link>
      <description>&lt;P&gt;what is your fieldname &lt;CODE&gt;titleID&lt;/CODE&gt; or &lt;CODE&gt;data.titleID&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 09:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322435#M96274</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-22T09:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322436#M96275</link>
      <description>&lt;P&gt;Are you sure that titleID is a number?&lt;BR /&gt;
Byte.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 09:50:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322436#M96275</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-01-22T09:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322437#M96276</link>
      <description>&lt;P&gt;oh yes, because my log contains field data which contains titleID and orderID so to get them it's data.titleID and data.orderID&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 10:04:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322437#M96276</guid>
      <dc:creator>swdowiarz</dc:creator>
      <dc:date>2018-01-22T10:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322438#M96277</link>
      <description>&lt;P&gt;No it's not a number, sorry that I didn't specify it properly, "data.titleID" is some string and I would like to have stats of how many times each user has used each data.titleID&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 10:08:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322438#M96277</guid>
      <dc:creator>swdowiarz</dc:creator>
      <dc:date>2018-01-22T10:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322439#M96278</link>
      <description>&lt;P&gt;in this case you can use &lt;CODE&gt;dc("data.titleID") AS "data.titleID"&lt;/CODE&gt; &lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 10:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322439#M96278</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-01-22T10:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322440#M96279</link>
      <description>&lt;P&gt;According to the comments, I think you want something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count by data.userID data.titleID | sort- count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So this query will give you the stats of how many times each data.userID has used each data.titleID.&lt;/P&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 10:27:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322440#M96279</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-22T10:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322441#M96280</link>
      <description>&lt;P&gt;I have the following issue:&lt;BR /&gt;
Search Factory: Unknown search command 'dc'.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 10:28:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322441#M96280</guid>
      <dc:creator>swdowiarz</dc:creator>
      <dc:date>2018-01-22T10:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322442#M96281</link>
      <description>&lt;P&gt;that's what I wanted, can I have some graph of it ? I mean graph which contains user and titleID ? For example graph which shows user and most used titleID and the number how many times he used this titleID ?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 10:51:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322442#M96281</guid>
      <dc:creator>swdowiarz</dc:creator>
      <dc:date>2018-01-22T10:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Chart and table of occurences of field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322443#M96282</link>
      <description>&lt;P&gt;count field gives you that only i.e. how many times he used corresponding titleID.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| chart usenull=f useother=f  count over data.userID by data.titleID where max in top3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then you can use &lt;CODE&gt;line chart&lt;/CODE&gt; on the visualization tab. &lt;CODE&gt;max in top3&lt;/CODE&gt; means &lt;CODE&gt;top 3 titleID's&lt;/CODE&gt;&lt;BR /&gt;
you can specify any number top3,top5,top10,etc.&lt;/P&gt;

&lt;P&gt;for more you can refer this doc&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Chart#where_clause"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Chart#where_clause&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 11:55:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-and-table-of-occurences-of-field-by-another-field/m-p/322443#M96282</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-22T11:55:18Z</dc:date>
    </item>
  </channel>
</rss>

