<?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 by 2 fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659308#M227658</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/149978"&gt;@sarit_s&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;chart command will not work with multiple fileds , try using stats&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2023 14:18:29 GMT</pubDate>
    <dc:creator>SanjayReddy</dc:creator>
    <dc:date>2023-10-02T14:18:29Z</dc:date>
    <item>
      <title>How to run a chart command grouped by 2 fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659305#M227656</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;Im trying to run a chart command grouped by 2 fields but im getting an error:&lt;BR /&gt;&lt;BR /&gt;this is my query :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;|  chart values(SuccessRatioBE) as SuccessRatioBE over _time by UserAgent LoginType&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and im getting this error :&lt;BR /&gt;"&lt;SPAN&gt;Error in 'chart' command: The argument 'LoginType' is invalid."&lt;BR /&gt;I also tried with comma to separate&amp;nbsp;between the fields and ticks&amp;nbsp;also&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 21:09:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659305#M227656</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2023-10-03T21:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659307#M227657</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/149978"&gt;@sarit_s&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in the chart command you can use only one field for the OVER or the BY option, you cannot use two fields.&lt;/P&gt;&lt;P&gt;the only way (if acceptable) is concatenate the two fields in one:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Column=UserAgent."|".LoginType
|  chart values(SuccessRatioBE) AS SuccessRatioBE over _time BY Column&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 14:18:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659307#M227657</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-02T14:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659308#M227658</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/149978"&gt;@sarit_s&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;chart command will not work with multiple fileds , try using stats&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 14:18:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659308#M227658</guid>
      <dc:creator>SanjayReddy</dc:creator>
      <dc:date>2023-10-02T14:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659309#M227659</link>
      <description>&lt;P&gt;but then it won't be by time also , no ?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 14:21:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659309#M227659</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2023-10-02T14:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659346#M227668</link>
      <description>&lt;P&gt;To chart over time you use the timechart command. It is a functional equivalent of charting over _time with a bin command applied beforehand. It's just shorter and more straightforward.&lt;/P&gt;&lt;P&gt;But both timechart and chart work over only one category field. If you want to analyze time series over more than one variable fields you need to combine them into a single artificial field. For example (yes, I know this particular search would be more effective with tstats insteads of stats but that's just to show the general idea):&lt;/P&gt;&lt;PRE&gt;index=_internal earliest=-2h&lt;BR /&gt;| eval series=sourcetype."-".host&lt;BR /&gt;| timechart span=10m count by series&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2023 21:57:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659346#M227668</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-10-02T21:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659411#M227678</link>
      <description>&lt;P&gt;The best way to understand the choice made by &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Chart" target="_blank" rel="noopener"&gt;chart&lt;/A&gt; command is to draw a chart manually. &amp;nbsp;If you cannot draw a chart with two group-by series, chart is correct. (Same with timechart. &amp;nbsp;I also wonder why you opt to use chart over _time instead of just timechart.) &amp;nbsp;If you can draw such a chart, chances are that it should either be a stats chart as &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236694"&gt;@SanjayReddy&lt;/a&gt;&amp;nbsp;suggested - stats can also use _time, just not in the same form as chart over _time; or it would be something like&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;suggested, i.e., "banding" two series into a single series.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 08:08:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659411#M227678</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-10-03T08:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659469#M227697</link>
      <description>&lt;P&gt;its returns very weird results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sarit_s_0-1696354935371.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27425i9E7E46BA8D3F1E64/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sarit_s_0-1696354935371.png" alt="sarit_s_0-1696354935371.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 17:42:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659469#M227697</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2023-10-03T17:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659474#M227700</link>
      <description>&lt;P&gt;Maybe you can illustrate your sample data in text (anonymize as needed) and explain why the result is "weird"? (I.e., explain the logic between your data and desired output.) &amp;nbsp;What is the desired result? (I.e., manually chart the result yourself as I suggested above.)&lt;/P&gt;&lt;P&gt;Also, do&amp;nbsp;UserAgent and LoginType always appear in the same event?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 17:58:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659474#M227700</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-10-03T17:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659581#M227727</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/149978"&gt;@sarit_s&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;as I said, I don't know if the solution is acceptable for you, this is a workaround because it isn't possible to group from more than one field.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 06:46:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-a-chart-command-grouped-by-2-fields/m-p/659581#M227727</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-04T06:46:32Z</dc:date>
    </item>
  </channel>
</rss>

