<?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: How to fill auto-fill missing dates in a time range and fill null with previous value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490959#M137083</link>
    <description>&lt;P&gt;Good morning, &lt;/P&gt;

&lt;P&gt;Thank you for your help with this query. The goal in getting the data in that format is that I then have to look for each USERNUMBER add a conditional statement if the weight on a given day is greater than 500.000 or not, then add how many USERS had a weight over 500 and how many didn't on each day in April. I used your code and it worked in filling in the missing dates and also filling in with previous weights on the missing date (thank you). However, I have over 80,000 unique usernumbers, this means that I should have that many number of columns (splunk truncates them to show just 10). I tried transposing the result so I can instead have a table like this:&lt;BR /&gt;
USERNUMBER  04/02/2020 04/03/2020&lt;BR /&gt;
545                      245.2400    260.2400&lt;/P&gt;

&lt;P&gt;but I still got only 10 USERNUMBERS/rows.&lt;BR /&gt;
Given these details, what would be the best way to display the data so I can add the conditional statements? Thank you again for your help. &lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2020 13:54:02 GMT</pubDate>
    <dc:creator>srive326</dc:creator>
    <dc:date>2020-05-05T13:54:02Z</dc:date>
    <item>
      <title>How to fill auto-fill missing dates in a time range and fill null with previous value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490956#M137080</link>
      <description>&lt;P&gt;Hello everyone, &lt;/P&gt;

&lt;P&gt;I need help with a query. &lt;/P&gt;

&lt;P&gt;I have a table with the following fields:&lt;/P&gt;

&lt;P&gt;_time               USERNUMBER  WEIGHT&lt;BR /&gt;
2020-04-02 07:17:12.397     545     245.2400&lt;BR /&gt;
2020-04-02 07:17:12.400     547     100.0011&lt;BR /&gt;
2020-04-03 07:15:37.956     545     260.2400&lt;BR /&gt;
2020-04-06 07:16:41.763     545     245.2400&lt;BR /&gt;
2020-04-09 07:15:38.864     545     612.5600&lt;BR /&gt;
2020-04-10 07:15:59.845     545     245.2400&lt;BR /&gt;
2020-04-10 07:17:12.401     547     100.0011&lt;BR /&gt;
2020-04-13 07:16:32.169     545     245.0258&lt;BR /&gt;
2020-04-15 07:15:37.027     545     245.2400&lt;BR /&gt;
2020-04-15 07:15:37.027     547     120.2400&lt;BR /&gt;
2020-04-16 07:15:44.469     545     156.2400&lt;BR /&gt;
2020-04-17 07:15:46.726     545     245.0215&lt;BR /&gt;
2020-04-20 07:16:45.495     545     142.2400&lt;BR /&gt;
2020-04-22 07:15:54.629     545     245.0214&lt;BR /&gt;
2020-04-22 07:15:54.629     547     106.0521&lt;BR /&gt;
2020-04-23 07:15:43.608     545     965.2850&lt;BR /&gt;
2020-04-25 07:15:50.403     545     245.2100&lt;BR /&gt;
2020-04-27 07:16:48.186     545     335.2400&lt;BR /&gt;
2020-04-28 07:15:52.713     545     245.5596&lt;BR /&gt;
2020-04-29 07:15:54.472     545     520.2400&lt;BR /&gt;
2020-05-01 07:15:52.179     545     245.0018&lt;/P&gt;

&lt;P&gt;I want to show for each USERNUMBER the weight on each day of the month of April. The problem is, that&lt;BR /&gt;
the weight is only updated when there has been a change. How can I autofill the missing dates in April, and also&lt;BR /&gt;
populate the WEIGHT for those missing dates with the WEIGHT that was there the previous day for that USER. &lt;BR /&gt;
So for example if I'm only looking at USERNUMBER 545 the rows from 04/02 to 04/09 will look like:&lt;/P&gt;

&lt;P&gt;2020-04-02 07:17:12.397     545     245.2400&lt;BR /&gt;
2020-04-03 07:15:37.956     545     260.2400&lt;BR /&gt;
2020-04-04 00:00:00.000     545     260.2400&lt;BR /&gt;
2020-04-05 00:00:00.000     545     260.2400&lt;BR /&gt;
2020-04-06 07:16:41.763     545     245.2400&lt;BR /&gt;
2020-04-07 00:00:00.000     545     245.2400&lt;BR /&gt;
2020-04-08 00:00:00.000     545     245.2400&lt;BR /&gt;
2020-04-09 07:15:38.864     545     612.5600&lt;/P&gt;

&lt;P&gt;Sidenote: The Hour/Time component of the date is not important to me&lt;BR /&gt;
I hope this makes sense, thank you in advance for your help. &lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 20:30:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490956#M137080</guid>
      <dc:creator>srive326</dc:creator>
      <dc:date>2020-05-04T20:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill auto-fill missing dates in a time range and fill null with previous value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490957#M137081</link>
      <description>&lt;P&gt;Check out the &lt;CODE&gt;filldown&lt;/CODE&gt; command.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 20:48:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490957#M137081</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-04T20:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill auto-fill missing dates in a time range and fill null with previous value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490958#M137082</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="_time,USERNUMBER,WEIGHT
2020-04-02 07:17:12.397,545,245.2400
2020-04-02 07:17:12.400,547,100.0011
2020-04-03 07:15:37.956,545,260.2400
2020-04-06 07:16:41.763,545,245.2400
2020-04-09 07:15:38.864,545,612.5600
2020-04-10 07:15:59.845,545,245.2400
2020-04-10 07:17:12.401,547,100.0011
2020-04-13 07:16:32.169,545,245.0258
2020-04-15 07:15:37.027,545,245.2400
2020-04-15 07:15:37.027,547,120.2400
2020-04-16 07:15:44.469,545,156.2400
2020-04-17 07:15:46.726,545,245.0215
2020-04-20 07:16:45.495,545,142.2400
2020-04-22 07:15:54.629,545,245.0214
2020-04-22 07:15:54.629,547,106.0521
2020-04-23 07:15:43.608,545,965.2850
2020-04-25 07:15:50.403,545,245.2100
2020-04-27 07:16:48.186,545,335.2400
2020-04-28 07:15:52.713,545,245.5596
2020-04-29 07:15:54.472,545,520.2400
2020-05-01 07:15:52.179,545,245.0018"
| multikv forceheader=1
| eval _time=strptime(time,"%F %T.%3Q")
| table _time USERNUMBER WEIGHT
| rename COMMENT as "this is sample"
| timechart cont=f span=1d list(WEIGHT) by USERNUMBER
| makecontinuous _time span=1d
| rename COMMENT as "Timerange created. check at this"
| filldown
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't know what you want to display. How about this?&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 22:48:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490958#M137082</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-04T22:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill auto-fill missing dates in a time range and fill null with previous value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490959#M137083</link>
      <description>&lt;P&gt;Good morning, &lt;/P&gt;

&lt;P&gt;Thank you for your help with this query. The goal in getting the data in that format is that I then have to look for each USERNUMBER add a conditional statement if the weight on a given day is greater than 500.000 or not, then add how many USERS had a weight over 500 and how many didn't on each day in April. I used your code and it worked in filling in the missing dates and also filling in with previous weights on the missing date (thank you). However, I have over 80,000 unique usernumbers, this means that I should have that many number of columns (splunk truncates them to show just 10). I tried transposing the result so I can instead have a table like this:&lt;BR /&gt;
USERNUMBER  04/02/2020 04/03/2020&lt;BR /&gt;
545                      245.2400    260.2400&lt;/P&gt;

&lt;P&gt;but I still got only 10 USERNUMBERS/rows.&lt;BR /&gt;
Given these details, what would be the best way to display the data so I can add the conditional statements? Thank you again for your help. &lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 13:54:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490959#M137083</guid>
      <dc:creator>srive326</dc:creator>
      <dc:date>2020-05-05T13:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill auto-fill missing dates in a time range and fill null with previous value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490960#M137084</link>
      <description>&lt;P&gt;10 is the default limit of &lt;CODE&gt;timechart&lt;/CODE&gt;.  Try &lt;CODE&gt;timechart limit=0 ...&lt;/CODE&gt;, but I suspect 80,000 values may be too many to render.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 14:08:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490960#M137084</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-05T14:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill auto-fill missing dates in a time range and fill null with previous value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490961#M137085</link>
      <description>&lt;P&gt;You're missing the goal and the question, and the method is completely different.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 16:02:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490961#M137085</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-05T16:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill auto-fill missing dates in a time range and fill null with previous value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490962#M137086</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;Thank you for your input. I changed the limit to 0 and this helped return more USERNUMBERS.&lt;/P&gt;

&lt;P&gt;I modified what  to4kawa shared so it now looks like this:&lt;/P&gt;

&lt;P&gt;| timechart limit=0 cont=f span=1d list(WEIGHT) by USERNUMBER&lt;BR /&gt;
 | makecontinuous _time span=1d&lt;BR /&gt;
 | rename COMMENT as "Timerange created. check at this"&lt;BR /&gt;
 | filldown&lt;BR /&gt;
 | eval _time=strftime(_time,"%Y-%d-%m %H:%M")&lt;BR /&gt;
 |transpose header_field=_time&lt;/P&gt;

&lt;P&gt;This returns the USERNUMBER counts I expected (about 80k) but it only shows the first 5 dates as columns. Is there something else I need to edit to show the other dates?&lt;BR /&gt;
I did get this error after it finished running: Events might not be returned in sub-second order due to search memory limits. See search.log for more information. Increase the value of the following limits.conf setting:[search]:max_rawsize_perchunk.&lt;/P&gt;

&lt;P&gt;Also if I don't transpose the program doesn't finish and I get a few different errors. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490962#M137086</guid>
      <dc:creator>srive326</dc:creator>
      <dc:date>2020-09-30T05:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to fill auto-fill missing dates in a time range and fill null with previous value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490963#M137087</link>
      <description>&lt;P&gt;Ok, I will write a new question with all those details. I left them out because I thought I would be able to handle the second part of the query on my own.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 20:26:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fill-auto-fill-missing-dates-in-a-time-range-and-fill/m-p/490963#M137087</guid>
      <dc:creator>srive326</dc:creator>
      <dc:date>2020-05-05T20:26:58Z</dc:date>
    </item>
  </channel>
</rss>

