<?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: Single with timechart display issue in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-with-timechart-display-issue/m-p/682924#M55888</link>
    <description>&lt;P&gt;Can you give a bit more about your query because having to use appendpipe to get dates filled in seems a little unusual. This example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval count=split("2,0,2,0,0,0,0",",")
| mvexpand count
| streamstats c
| eval _time=now() - ((7 - c) * 86400)
| fields - c&lt;/LI-CODE&gt;&lt;P&gt;will produce this single viz whether or not you add&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart span=1d max(count) as count&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bowesmana_0-1712099388384.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/30141iCAF5E93DDE9B7C13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bowesmana_0-1712099388384.png" alt="bowesmana_0-1712099388384.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Apr 2024 23:12:12 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2024-04-02T23:12:12Z</dc:date>
    <item>
      <title>Single with timechart display issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-with-timechart-display-issue/m-p/682781#M55885</link>
      <description>&lt;P&gt;I have a query that counts totals for each day for the past 7 days and produces these results: 2, 0, 2, 0, 0, 0, 0. No matter what I do, the SINGLE with timechart and trendlines enabled produced ignores the trailing zeros and displays a 2, with a trendling of increasing 2. It should diplay a zero with a zero trend line representing the last two segments (both zero).&lt;/P&gt;
&lt;P&gt;Before the main query (as recommended) I have used the | makeresults earliest"-7d@d" count =0 to ensure the days with zero count are included. I have tried the suggested appendpipe option:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| appendpipe [| stats count | where count=0 | addinfo | eval _time=info_min_time | table _time count]

&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;and the appendpipe with max(count) option:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| appendpipe [| stats count | where count=0 | addinfo | eval time=info_min_time." ".info_max_time | table time count | makemv time | mvexpand time | rename time as _time | timechart span=1d max(count) as count]

&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Neither create the correct timechart.&lt;/P&gt;
&lt;P&gt;From the dashboard in the Edit UI mode, if I click on the query magnifying glass and open in a new tab, the results do NOT diplay the trailing zeros.&lt;/P&gt;
&lt;P&gt;If I copy and paste the query into a search bar with the time picker set to All Time, I get the correct values: 2, 0, 2, 0, 0, 0, 0. Is there an option setting I may have wrong? How do I fix this?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 17:50:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-with-timechart-display-issue/m-p/682781#M55885</guid>
      <dc:creator>Chris_Semon</dc:creator>
      <dc:date>2024-04-02T17:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Single with timechart display issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-with-timechart-display-issue/m-p/682900#M55887</link>
      <description>&lt;P&gt;I don't fully understand what you mean... would it be possible to include screenshots demonstrating the timechart you would like (using the All-time search) versus what you get? Also a full query (without private information) would be very helpful.&lt;/P&gt;&lt;P&gt;E.g. something like this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="marnall_0-1712089677436.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/30135i659D1A62A58AEDC6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="marnall_0-1712089677436.png" alt="marnall_0-1712089677436.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 20:28:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-with-timechart-display-issue/m-p/682900#M55887</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-04-02T20:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Single with timechart display issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-with-timechart-display-issue/m-p/682924#M55888</link>
      <description>&lt;P&gt;Can you give a bit more about your query because having to use appendpipe to get dates filled in seems a little unusual. This example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval count=split("2,0,2,0,0,0,0",",")
| mvexpand count
| streamstats c
| eval _time=now() - ((7 - c) * 86400)
| fields - c&lt;/LI-CODE&gt;&lt;P&gt;will produce this single viz whether or not you add&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart span=1d max(count) as count&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bowesmana_0-1712099388384.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/30141iCAF5E93DDE9B7C13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bowesmana_0-1712099388384.png" alt="bowesmana_0-1712099388384.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 23:12:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-with-timechart-display-issue/m-p/682924#M55888</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-04-02T23:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Single with timechart display issue</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Single-with-timechart-display-issue/m-p/683043#M55895</link>
      <description>&lt;P&gt;Thank you for your help, but I figured out what was wrong. The query I am using pulls data from a relational database. We have created a macro that converts the SPL into the query language for that DB and part of that includes the time frame. So essentially, for those queries the time picker is irrelevant. As I stated previously, the query works fine in the splunk search bar. However, in the dashboard, the query is the PARENT Query, and the results are filtered by subsequent child queries. The child queries have no concept of the earliest or latest, &amp;nbsp;even though they are supposed to inherit that from the parent query, and the SPL doesn't allow you to put that code in after the filter query. Our problem was that since the Parent Query didn't use the earliest and latest times, we deleted the code that defined that after the query. Once I reinserted the code for the earliest and latest times after the Parent Query, the Single with trend lines worked as they should.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 14:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Single-with-timechart-display-issue/m-p/683043#M55895</guid>
      <dc:creator>Chris_Semon</dc:creator>
      <dc:date>2024-04-03T14:30:34Z</dc:date>
    </item>
  </channel>
</rss>

