<?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 do you add blank values to a table visualization? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-add-blank-values-to-a-table-visualization/m-p/423860#M27908</link>
    <description>&lt;P&gt;thanks but this doesn't give any statistical data that can be plotted so doesn't generate the visualisation.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Dec 2018 13:02:50 GMT</pubDate>
    <dc:creator>Esky73</dc:creator>
    <dc:date>2018-12-06T13:02:50Z</dc:date>
    <item>
      <title>How do you add blank values to a table visualization?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-add-blank-values-to-a-table-visualization/m-p/423858#M27906</link>
      <description>&lt;P&gt;I have a visualisation that requires fields in a table and the search is :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=X "Name"="X" sourcetype=csv EXEC_AVAILABILITY=201 OR 401 
| eval value = tonumber(replace(STEP_RESPONSE_TIME, "," , ""),10)/1000 
| eval name = strftime(_time,"%d/%m/%y") 
| eval order = strftime(_time,"%w") 
| eval status=case(value&amp;lt;=4.0,"GREEN",value&amp;gt;=4.0 AND value &amp;lt;=6.5, "AMBER", 1==1, "RED") 
| eval new_time = strptime("2018-01-01 " . strftime(_time, "%H:%M"), "%Y-%m-%d %H:%M") 
| rename new_time as _time 
| eval status = value 
| sort name, _time 
    | table _time, name, value, status, order
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, if there is a gap in the data, then the table only renders the first few days — e.g.: if there is data for the 1st - 3rd of a month, then nothing til the 5th - 31st, for example, — it only renders the 1st to the 3rd in the table.&lt;/P&gt;

&lt;P&gt;I've been playing around with adding blank values using | gentimes to populate the missing data points, but I can't seem to marry the two up. For example, this search gives me an empty visualization from the 1st of November to the present date&lt;/P&gt;

&lt;P&gt;Now i want this — plus the search from above showing the values where present.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=11/1/2018 increment=1d 
| eval _time=starttime
| eval name = strftime(_time,"%d/%m/%y")  | eval order = strftime(_time,"%w")
| eval value=" "
| table _time, name, value, status
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Dec 2018 14:19:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-add-blank-values-to-a-table-visualization/m-p/423858#M27906</guid>
      <dc:creator>Esky73</dc:creator>
      <dc:date>2018-12-05T14:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do you add blank values to a table visualization?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-add-blank-values-to-a-table-visualization/m-p/423859#M27907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;basically you might want to use &lt;CODE&gt;timechart&lt;/CODE&gt; to get a time series with &lt;CODE&gt;span=1d&lt;/CODE&gt; in order to aggregate to one day. You could aggregate all your values with &lt;CODE&gt;avg(xxx) as xxx&lt;/CODE&gt; or any other aggregation method (also &lt;CODE&gt;list()&lt;/CODE&gt; might help with developing that spl).&lt;/P&gt;

&lt;P&gt;Plain and expensive would be using &lt;CODE&gt;join&lt;/CODE&gt;:&lt;BR /&gt;
     index=X "Name"="X" sourcetype=csv EXEC_AVAILABILITY=201 OR 401 &lt;BR /&gt;
     | eval value = tonumber(replace(STEP_RESPONSE_TIME, "," , ""),10)/1000 &lt;BR /&gt;
     | eval name = strftime(_time,"%d/%m/%y") &lt;BR /&gt;
     | eval order = strftime(_time,"%w") &lt;BR /&gt;
     | eval status=case(value&amp;lt;=4.0,"GREEN",value&amp;gt;=4.0 AND value &amp;lt;=6.5, "AMBER", 1==1, "RED") &lt;BR /&gt;
     | eval new_time = strptime("2018-01-01 " . strftime(_time, "%H:%M"), "%Y-%m-%d %H:%M") &lt;BR /&gt;
     | rename new_time as _time &lt;BR /&gt;
     | eval status = value &lt;BR /&gt;
     | sort name, _time &lt;BR /&gt;
         | table _time, name, value, status, order&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| join type=inner _time [ 
 | gentimes start=11/1/2018 increment=1d 
 | eval _time=starttime
 | eval name = strftime(_time,"%d/%m/%y")  | eval order = strftime(_time,"%w")
 | eval value=" "
 | table _time, name, value, status
]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheerz,&lt;BR /&gt;
Björn&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:16:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-add-blank-values-to-a-table-visualization/m-p/423859#M27907</guid>
      <dc:creator>bjoernjensen</dc:creator>
      <dc:date>2020-09-29T22:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do you add blank values to a table visualization?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-add-blank-values-to-a-table-visualization/m-p/423860#M27908</link>
      <description>&lt;P&gt;thanks but this doesn't give any statistical data that can be plotted so doesn't generate the visualisation.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 13:02:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-add-blank-values-to-a-table-visualization/m-p/423860#M27908</guid>
      <dc:creator>Esky73</dc:creator>
      <dc:date>2018-12-06T13:02:50Z</dc:date>
    </item>
  </channel>
</rss>

