<?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: Appendcols Error in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341520#M41209</link>
    <description>&lt;P&gt;@Tiago. I am hoping you have Threshold computed in the lookup file for the same duration/span being plotted through timechart on your base search.&lt;/P&gt;

&lt;P&gt;Can you please try &lt;STRONG&gt;join&lt;/STRONG&gt; instead of appendcols. Make sure the only the field required to be correlated is present in your base query/timechart from your saved search and also in the sub-search from the lookup file.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;search id="rootchart" base="StatusChart"&amp;gt;
 &amp;lt;query&amp;gt;
       | timechart blablabla 
       | join 
               [ | inputlookup Thresholds.csv ] ..........
 &amp;lt;/query&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: You can also check &lt;STRONG&gt;appendpipe&lt;/STRONG&gt;  or &lt;STRONG&gt;append&lt;/STRONG&gt; which should work as opposed to appendcols, however, might not fit your need.&lt;/P&gt;</description>
    <pubDate>Sun, 12 Mar 2017 22:13:13 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-03-12T22:13:13Z</dc:date>
    <item>
      <title>Appendcols Error</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341516#M41205</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a dashboard and a saved search is referenced into a simple xml search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;search id="StatusChart" ref="ESB_StatusCharts"&amp;gt;
    &amp;lt;latest&amp;gt;$Drilldown_Picker.latest$&amp;lt;/latest&amp;gt;
    &amp;lt;earliest&amp;gt;$Drilldown_Picker.earliest$&amp;lt;/earliest&amp;gt;
  &amp;lt;/search&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I use this as a base search for another query, like this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search id="rootchart" base="StatusChart"&amp;gt;
&amp;lt;query&amp;gt;
      | timechart blablabla |appendcols [ | inputlookup Thresholds.csv ] ..........
&amp;lt;/query&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have this error:"  &lt;STRONG&gt;Error in 'appendcols' command: You can only use appendcols after a reporting command (such as stats, chart, or timechart)."&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Which doesn't make any sense, the timechart is right before it. Furthermore, if I take the savedsearch code and put it explicitly in the simple xml code, it works fine....&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Anyone?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 14:37:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341516#M41205</guid>
      <dc:creator>TiagoTLD1</dc:creator>
      <dc:date>2017-03-07T14:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Appendcols Error</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341517#M41206</link>
      <description>&lt;P&gt;What you do get from the lookup table, a single row/column?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 15:29:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341517#M41206</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-07T15:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Appendcols Error</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341518#M41207</link>
      <description>&lt;P&gt;A row with 6 columns&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 15:43:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341518#M41207</guid>
      <dc:creator>TiagoTLD1</dc:creator>
      <dc:date>2017-03-07T15:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Appendcols Error</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341519#M41208</link>
      <description>&lt;P&gt;This looks like a bug; I would open a support ticket.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 20:59:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341519#M41208</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-07T20:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Appendcols Error</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341520#M41209</link>
      <description>&lt;P&gt;@Tiago. I am hoping you have Threshold computed in the lookup file for the same duration/span being plotted through timechart on your base search.&lt;/P&gt;

&lt;P&gt;Can you please try &lt;STRONG&gt;join&lt;/STRONG&gt; instead of appendcols. Make sure the only the field required to be correlated is present in your base query/timechart from your saved search and also in the sub-search from the lookup file.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;search id="rootchart" base="StatusChart"&amp;gt;
 &amp;lt;query&amp;gt;
       | timechart blablabla 
       | join 
               [ | inputlookup Thresholds.csv ] ..........
 &amp;lt;/query&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: You can also check &lt;STRONG&gt;appendpipe&lt;/STRONG&gt;  or &lt;STRONG&gt;append&lt;/STRONG&gt; which should work as opposed to appendcols, however, might not fit your need.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Mar 2017 22:13:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341520#M41209</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-03-12T22:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Appendcols Error</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341521#M41210</link>
      <description>&lt;P&gt;I have this same problem in Splunk 6.5.1. It seems to have started when I changed a dashboard panel to use a base search rather than an inline search. When I click the magnifying glass on this panel and run the search it works correctly.&lt;/P&gt;

&lt;P&gt;The logic in this search is to calculate one single value (users who did X), then calculate a maximum possible value (all possible users) and calculate a percentage for a gauge visualization.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 17:35:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341521#M41210</guid>
      <dc:creator>cjj1977</dc:creator>
      <dc:date>2018-01-16T17:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Appendcols Error</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341522#M41211</link>
      <description>&lt;P&gt;I am guessing that this is a bug, as per the comment by @woodcock above.&lt;/P&gt;

&lt;P&gt;I had this problem in Spunk 6.5.1 for a gauge visualization. I was using a base search (as per the original question above). When I removed the base search and added the full search in-line on that panel the gauge worked.&lt;/P&gt;

&lt;P&gt;I tried tweaking both the base search (e.g. explicitly choosing the columns with the &lt;STRONG&gt;fields&lt;/STRONG&gt; command) and changing the syntax of the &lt;STRONG&gt;stats&lt;/STRONG&gt; command (e.g. by adding--in my case--a logically unnecessary "BY" clause). Nothing worked.&lt;/P&gt;

&lt;P&gt;I guess another workaround could be to use &lt;STRONG&gt;append&lt;/STRONG&gt; with a dummy field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;main_search&amp;gt;
| stats count
| eval dummy=1
| append [| &amp;lt;second_search&amp;gt; | stats count AS total | eval dummy=1 ]
| stats max(count) AS count, max(total) AS total BY results
| eval percentage = round(count / total * 100, 2)
| table percentage
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jan 2018 18:38:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341522#M41211</guid>
      <dc:creator>cjj1977</dc:creator>
      <dc:date>2018-01-16T18:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Appendcols Error</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341523#M41212</link>
      <description>&lt;P&gt;Ugh, I just ran into this too. Works fine as long as you don't use a base search in a dashboard. &lt;/P&gt;</description>
      <pubDate>Tue, 02 Oct 2018 22:13:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Appendcols-Error/m-p/341523#M41212</guid>
      <dc:creator>joshualarkins</dc:creator>
      <dc:date>2018-10-02T22:13:39Z</dc:date>
    </item>
  </channel>
</rss>

