<?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: Is it possible to create Time chart with search with base search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-Time-chart-with-search-with-base-search/m-p/322419#M96268</link>
    <description>&lt;P&gt;I think you have missed out a pipe on the the query?&lt;/P&gt;

&lt;P&gt;timechart&lt;/P&gt;

&lt;P&gt;Should be:&lt;BR /&gt;
| timechart&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2020 12:15:09 GMT</pubDate>
    <dc:creator>virtualspeed</dc:creator>
    <dc:date>2020-01-20T12:15:09Z</dc:date>
    <item>
      <title>Is it possible to create Time chart with search with base search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-Time-chart-with-search-with-base-search/m-p/322417#M96266</link>
      <description>&lt;P&gt;I have a dashboard with the following base search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search id="CreatedDossierCount"&amp;gt;
    &amp;lt;query&amp;gt;index="customer1-closecl-prod-long" application="closecl" transactionType="createDossier"&amp;lt;/query&amp;gt;
    &amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;
  &amp;lt;/search&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and several panels based on this search, this simple one is working fine:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Aantal aanvragen vandaag&amp;lt;/title&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Aantal aanvragen&amp;lt;/title&amp;gt;
        &amp;lt;search base="CreatedDossierCount"&amp;gt;
          &amp;lt;query&amp;gt; stats count&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.size"&amp;gt;medium&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;gives me a number 35 at the moment. &lt;/P&gt;

&lt;P&gt;but a second one with a time chart is not:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Aantal aanvragen per tijdseenheid&amp;lt;/title&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search base="CreatedDossierCount"&amp;gt;
          &amp;lt;query&amp;gt;timechart minspan=1d bins=12 dc(dossierId) as count | fillnull&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="link.inspectSearch.visible"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="link.openSearch.visible"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;it gives me this result:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3958i8374005910262F21/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
if I then open in search I get this search from it: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="customer1-closecl-prod-long" application="closecl" transactionType="createDossier" | timechart minspan=1d bins=12 dc(dossierId) as count | fillnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;as expected. Which gives me this result:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3959i0AC83BDAF7E5DA8B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I even tried creating a dashboard panel from that search again, which gives me the same proper result, but if I move the first part of the search to the basesearch again I get the zeroes back. &lt;BR /&gt;
This leads  me to believe it is the combination of the base search and timechart. But I could be wrong. &lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 15:19:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-Time-chart-with-search-with-base-search/m-p/322417#M96266</guid>
      <dc:creator>fvegdom</dc:creator>
      <dc:date>2017-12-06T15:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to create Time chart with search with base search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-Time-chart-with-search-with-base-search/m-p/322418#M96267</link>
      <description>&lt;P&gt;I suspect you are running into this issue:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;In post-process searches, reference fields that are also referenced in the base search. If you are not referencing a particular field in the base search, do not reference it in the post-process search. Fields without a reference in the base search appear null in a post-process search. The post-process search returns no results in this case.&lt;BR /&gt;
&lt;EM&gt;Source: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/Savedsearches"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/Savedsearches&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;So you could try adding &lt;CODE&gt;| fields *&lt;/CODE&gt; to the base search in order to ensure the field is preserved. But the same documentation also mentions other pitfalls of using post-processing on a search that involves no &lt;EM&gt;transforming commands&lt;/EM&gt;. Given that your base search does not use any transforming commands, I think you may not get any benefit from using that as a base search anyway, and you may be best served by just using the whole query in the place where you've been trying to use a post-processed search.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 16:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-Time-chart-with-search-with-base-search/m-p/322418#M96267</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2017-12-06T16:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to create Time chart with search with base search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-Time-chart-with-search-with-base-search/m-p/322419#M96268</link>
      <description>&lt;P&gt;I think you have missed out a pipe on the the query?&lt;/P&gt;

&lt;P&gt;timechart&lt;/P&gt;

&lt;P&gt;Should be:&lt;BR /&gt;
| timechart&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 12:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-Time-chart-with-search-with-base-search/m-p/322419#M96268</guid>
      <dc:creator>virtualspeed</dc:creator>
      <dc:date>2020-01-20T12:15:09Z</dc:date>
    </item>
  </channel>
</rss>

