<?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 how to combine time chart  and bar chart together in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-combine-time-chart-and-bar-chart-together/m-p/571596#M199177</link>
    <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;1. I have first query which return me below chart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;baseQuery&amp;gt;
|timechart span=4w count(ACT) as countOfOpenSession, 
                   distinct_count(UID) as countOfUserID, 
                   distinct_count(CMN) as countOfCustomer&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cheriemilk_0-1634713532480.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16498i0303FF6143C9ACCF/image-size/large?v=v2&amp;amp;px=999" role="button" title="cheriemilk_0-1634713532480.png" alt="cheriemilk_0-1634713532480.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. then I have second query which return me below table and chart, which is for getting the CMN value which has highest hit value per month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;baseQuery&amp;gt;
| stats count(ACT) as hit by date_month CMN
| eventstats max(hit) as maxhit by date_month
| where hit=maxhit
| fields - maxhit&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cheriemilk_2-1634713812240.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16500i304FC4004EA7AB79/image-size/large?v=v2&amp;amp;px=999" role="button" title="cheriemilk_2-1634713812240.png" alt="cheriemilk_2-1634713812240.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cheriemilk_1-1634713662087.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16499iC2AB0C31D0DDA594/image-size/large?v=v2&amp;amp;px=999" role="button" title="cheriemilk_1-1634713662087.png" alt="cheriemilk_1-1634713662087.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected Chart I want to get from splunk search:&lt;/P&gt;&lt;P&gt;1. combine the two queries into one. (by the way, baseQuery for the two queries in my scenario are&amp;nbsp; same.)&lt;/P&gt;&lt;P&gt;2. combine the timeline chart and bar chart into one chart .&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. From the combined chart-&amp;gt;on the bars, to display both CMN(customer Name) and hit count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example chart I want(similar to below)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cheriemilk_3-1634714193515.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16501iD07E4CB5AE1D0861/image-size/large?v=v2&amp;amp;px=999" role="button" title="cheriemilk_3-1634714193515.png" alt="cheriemilk_3-1634714193515.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to edit the query and format to achieve the expected chart?&lt;/P&gt;</description>
    <pubDate>Thu, 21 Oct 2021 06:06:45 GMT</pubDate>
    <dc:creator>cheriemilk</dc:creator>
    <dc:date>2021-10-21T06:06:45Z</dc:date>
    <item>
      <title>how to combine time chart  and bar chart together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-combine-time-chart-and-bar-chart-together/m-p/571596#M199177</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;&lt;P&gt;1. I have first query which return me below chart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;baseQuery&amp;gt;
|timechart span=4w count(ACT) as countOfOpenSession, 
                   distinct_count(UID) as countOfUserID, 
                   distinct_count(CMN) as countOfCustomer&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cheriemilk_0-1634713532480.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16498i0303FF6143C9ACCF/image-size/large?v=v2&amp;amp;px=999" role="button" title="cheriemilk_0-1634713532480.png" alt="cheriemilk_0-1634713532480.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. then I have second query which return me below table and chart, which is for getting the CMN value which has highest hit value per month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;baseQuery&amp;gt;
| stats count(ACT) as hit by date_month CMN
| eventstats max(hit) as maxhit by date_month
| where hit=maxhit
| fields - maxhit&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cheriemilk_2-1634713812240.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16500i304FC4004EA7AB79/image-size/large?v=v2&amp;amp;px=999" role="button" title="cheriemilk_2-1634713812240.png" alt="cheriemilk_2-1634713812240.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cheriemilk_1-1634713662087.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16499iC2AB0C31D0DDA594/image-size/large?v=v2&amp;amp;px=999" role="button" title="cheriemilk_1-1634713662087.png" alt="cheriemilk_1-1634713662087.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected Chart I want to get from splunk search:&lt;/P&gt;&lt;P&gt;1. combine the two queries into one. (by the way, baseQuery for the two queries in my scenario are&amp;nbsp; same.)&lt;/P&gt;&lt;P&gt;2. combine the timeline chart and bar chart into one chart .&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. From the combined chart-&amp;gt;on the bars, to display both CMN(customer Name) and hit count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example chart I want(similar to below)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cheriemilk_3-1634714193515.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16501iD07E4CB5AE1D0861/image-size/large?v=v2&amp;amp;px=999" role="button" title="cheriemilk_3-1634714193515.png" alt="cheriemilk_3-1634714193515.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to edit the query and format to achieve the expected chart?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 06:06:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-combine-time-chart-and-bar-chart-together/m-p/571596#M199177</guid>
      <dc:creator>cheriemilk</dc:creator>
      <dc:date>2021-10-21T06:06:45Z</dc:date>
    </item>
  </channel>
</rss>

