<?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: multiple BY clause in chart/stat column in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594403#M206881</link>
    <description>&lt;P&gt;This will not work..The total hours are split by both Planned_Sprint and "Type" for each team.So the x axis becomes the Planned_Sprint&amp;nbsp; and the y axis has two things: the sum of "Total Hours" split across various "Types" as stacked bars and the actual Hours Line graph should be just sum(Actual Hours ) split across Planned_Sprint&lt;/P&gt;</description>
    <pubDate>Wed, 20 Apr 2022 09:56:54 GMT</pubDate>
    <dc:creator>GOSWAMIGAURAV</dc:creator>
    <dc:date>2022-04-20T09:56:54Z</dc:date>
    <item>
      <title>How to write search with multiple BY clause in chart/stat column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594390#M206875</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a query which returns Planned_Sprint, Total Hours,Actual Hours,Team,Type. Now i want a stacked bar and line chart , in which the stacked bars are split by Planned_Sprint,Type and the line is only Split by Planned_Sprint.&lt;/P&gt;&lt;P&gt;The X-axis as Planned_Sprint, the Y as (Total Hours)stacked bar and (Actual Hours)line.&lt;/P&gt;&lt;TABLE width="319px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="122.333px"&gt;Planned_Sprint&lt;/TD&gt;&lt;TD width="53.6833px"&gt;Total Hours&lt;/TD&gt;&lt;TD width="56.85px"&gt;Actual Hours&lt;/TD&gt;&lt;TD width="45.9px"&gt;Type&lt;/TD&gt;&lt;TD width="40px"&gt;Team&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="122.333px"&gt;Sp_1&lt;/TD&gt;&lt;TD width="53.6833px"&gt;10&lt;/TD&gt;&lt;TD width="56.85px"&gt;20&lt;/TD&gt;&lt;TD width="45.9px"&gt;A&lt;/TD&gt;&lt;TD width="40px"&gt;WWW&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="122.333px"&gt;Sp_1&lt;/TD&gt;&lt;TD width="53.6833px"&gt;15&lt;/TD&gt;&lt;TD width="56.85px"&gt;10&lt;/TD&gt;&lt;TD width="45.9px"&gt;B&lt;/TD&gt;&lt;TD width="40px"&gt;DDD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="122.333px"&gt;Sp_1&lt;/TD&gt;&lt;TD width="53.6833px"&gt;5&lt;/TD&gt;&lt;TD width="56.85px"&gt;10&lt;/TD&gt;&lt;TD width="45.9px"&gt;B&lt;/TD&gt;&lt;TD width="40px"&gt;RRR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="122.333px"&gt;Sp_2&lt;/TD&gt;&lt;TD width="53.6833px"&gt;10&lt;/TD&gt;&lt;TD width="56.85px"&gt;15&lt;/TD&gt;&lt;TD width="45.9px"&gt;A&lt;/TD&gt;&lt;TD width="40px"&gt;WWW&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="122.333px"&gt;Sp_2&lt;/TD&gt;&lt;TD width="53.6833px"&gt;20&lt;/TD&gt;&lt;TD width="56.85px"&gt;5&lt;/TD&gt;&lt;TD width="45.9px"&gt;A&lt;/TD&gt;&lt;TD width="40px"&gt;DDD&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="122.333px"&gt;Sp_2&lt;/TD&gt;&lt;TD width="53.6833px"&gt;10&lt;/TD&gt;&lt;TD width="56.85px"&gt;10&lt;/TD&gt;&lt;TD width="45.9px"&gt;B&lt;/TD&gt;&lt;TD width="40px"&gt;TTT&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="122.333px"&gt;Sp_2&lt;/TD&gt;&lt;TD width="53.6833px"&gt;5&lt;/TD&gt;&lt;TD width="56.85px"&gt;8&lt;/TD&gt;&lt;TD width="45.9px"&gt;C&lt;/TD&gt;&lt;TD width="40px"&gt;RRR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sp_3&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;TTT&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Here is my code for the chart:&lt;/P&gt;&lt;P&gt;| chart sum(Total Hours) AS PLANNED_Hours,sum(Actual Hours) as AC by Planned_Sprint,Type&lt;/P&gt;&lt;P&gt;But in this even the AC gets split by Type. I do not want this, i want something like this:&lt;/P&gt;&lt;P&gt;| chart sum(Total Hours) AS PLANNED_Hours by Planned_Sprint,Type, sum(Actual Hours) as AC by Planned_Sprint&lt;/P&gt;&lt;P&gt;Any suggestion how this can be achieved?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GOSWAMIGAURAV_0-1650450177956.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19143i0D00BACB74294190/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GOSWAMIGAURAV_0-1650450177956.png" alt="GOSWAMIGAURAV_0-1650450177956.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 11:16:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594390#M206875</guid>
      <dc:creator>GOSWAMIGAURAV</dc:creator>
      <dc:date>2022-05-25T11:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: multiple BY clause in chart/stat column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594393#M206876</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the easiest way would be an append...i am sure that there are multiple solutions out there to get this in one Go....but why bother if it can be achieved by a simple "append"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 09:28:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594393#M206876</guid>
      <dc:creator>Software-Simian</dc:creator>
      <dc:date>2022-04-20T09:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: multiple BY clause in chart/stat column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594396#M206877</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;you should do it something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your base search&amp;gt;
| stats sum('Total Hours') AS PLANNED_Hours sum('Actual Hours') as AC by Planned_Sprint&lt;/LI-CODE&gt;&lt;P&gt;Then select visualisation as bar chart and then there is an Overlay option where you should select AC.&lt;/P&gt;&lt;P&gt;Unfortunately I'm not getting what you want to do with Type or is it even relevant?&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 09:36:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594396#M206877</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-04-20T09:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to write search with multiple BY clause in chart/stat column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594399#M206879</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart sum(Total Hours) AS PLANNED_Hours,sum(Actual Hours) as AC by Planned_Sprint,Type
| fillnull value=0
| eval AC=0
| foreach AC:*
    [| eval AC=AC+'&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;']
| fields - AC:*&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 13:01:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594399#M206879</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-25T13:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: multiple BY clause in chart/stat column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594400#M206880</link>
      <description>&lt;P&gt;Hi Iso,&lt;/P&gt;&lt;P&gt;i just assumed that he wants to do:&lt;/P&gt;&lt;P&gt;Total Hours in case Type is A&lt;/P&gt;&lt;P&gt;Actual Hours in Case Type is B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically he tried using by as a filter...i think&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 09:44:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594400#M206880</guid>
      <dc:creator>Software-Simian</dc:creator>
      <dc:date>2022-04-20T09:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: multiple BY clause in chart/stat column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594403#M206881</link>
      <description>&lt;P&gt;This will not work..The total hours are split by both Planned_Sprint and "Type" for each team.So the x axis becomes the Planned_Sprint&amp;nbsp; and the y axis has two things: the sum of "Total Hours" split across various "Types" as stacked bars and the actual Hours Line graph should be just sum(Actual Hours ) split across Planned_Sprint&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 09:56:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594403#M206881</guid>
      <dc:creator>GOSWAMIGAURAV</dc:creator>
      <dc:date>2022-04-20T09:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: multiple BY clause in chart/stat column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594408#M206882</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have edited my question with the sample table and expected chart&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 10:28:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/594408#M206882</guid>
      <dc:creator>GOSWAMIGAURAV</dc:creator>
      <dc:date>2022-04-20T10:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: multiple BY clause in chart/stat column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/599262#M208620</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;I just figured, this works only if all or at least 2 "Type" are present. For the final row in my table above,where Planned Sprint = Spr_3,the Actual hours(AC) line does not come up as Spr_3 has only one Type unlike Spr_1 and Spr_2. Although there is data in Actual hours(AC) column.Any help here?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 11:31:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/599262#M208620</guid>
      <dc:creator>GOSWAMIGAURAV</dc:creator>
      <dc:date>2022-05-25T11:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: multiple BY clause in chart/stat column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/599285#M208631</link>
      <description>&lt;P&gt;I have figured it out, the null values were causing problems. |Fornull value=0 solves it&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 12:58:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-multiple-BY-clause-in-chart-stat-column/m-p/599285#M208631</guid>
      <dc:creator>GOSWAMIGAURAV</dc:creator>
      <dc:date>2022-05-25T12:58:38Z</dc:date>
    </item>
  </channel>
</rss>

