<?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: Can we use the Splunk UI to sort our data by each column, or does that need to be in the search syntax? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307433#M57902</link>
    <description>&lt;P&gt;I updated my answer, so I think it now meets all of your requirements. Give it a try!&lt;/P&gt;</description>
    <pubDate>Sat, 14 Oct 2017 22:28:30 GMT</pubDate>
    <dc:creator>elliotproebstel</dc:creator>
    <dc:date>2017-10-14T22:28:30Z</dc:date>
    <item>
      <title>Can we use the Splunk UI to sort our data by each column, or does that need to be in the search syntax?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307425#M57894</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;We have been importing a particular CSV daily into a single index, so the data is nice and clean.  &lt;/P&gt;

&lt;P&gt;We want to perform 1 search and chart out results.  &lt;/P&gt;

&lt;P&gt;Fields are:  Volume, Change, Price&lt;BR /&gt;
Volume needs to be greater than 1&lt;BR /&gt;
Change needs to be greater than 1&lt;BR /&gt;
Price needs to be greater than 0.001&lt;BR /&gt;
These 3 fields will determine results.  &lt;/P&gt;

&lt;P&gt;We want to then output a table that has the following columns:&lt;BR /&gt;&lt;BR /&gt;
Symbol&lt;BR /&gt;
Volume&lt;BR /&gt;
Change&lt;BR /&gt;
Price&lt;/P&gt;

&lt;P&gt;We want to then have the flexibility to sort the table results by one of the 3 fields (volume, change, price) listed above in ascending or descending order.  &lt;/P&gt;

&lt;P&gt;Does the sort need to be included in the search syntax, or can we simply use the Splunk UI to click the column to sort? (So far, I don't see this as an option, but I could be doing something wrong).  &lt;/P&gt;

&lt;P&gt;HERE'S THE KICKER...&lt;BR /&gt;
The "volume" field must have been 0 at some point in time (remember, we are ingesting results daily), and must have changed to greater than 1 (as per above requirement).  &lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 01:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307425#M57894</guid>
      <dc:creator>agoktas</dc:creator>
      <dc:date>2017-10-14T01:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use the Splunk UI to sort our data by each column, or does that need to be in the search syntax?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307426#M57895</link>
      <description>&lt;P&gt;Where is the field symbol coming from? Can you post some sample data and the desired format how you want the output to be ?&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 02:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307426#M57895</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2017-10-14T02:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use the Splunk UI to sort our data by each column, or does that need to be in the search syntax?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307427#M57896</link>
      <description>&lt;P&gt;So based on the first part of your question I would have said something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Volume&amp;gt;1 Change&amp;gt;1 Price&amp;gt;0.001 | table Symbol, Volume, Change, Price
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However you also said the Volume was zero at some point, does that mean you want Volume&amp;gt;1 OR Volume=0 ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Volume&amp;gt;1 OR Volume=0 Change&amp;gt;1 Price&amp;gt;0.001 | table Symbol, Volume, Change, Price
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To sort you can add in a sort command, sort - Volume, or sort Volume for example. If you are using a dashboard then you can substitute a variable into the sort command...&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 02:08:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307427#M57896</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2017-10-14T02:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use the Splunk UI to sort our data by each column, or does that need to be in the search syntax?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307428#M57897</link>
      <description>&lt;P&gt;You didn't specify that the input CSV contained the field  &lt;CODE&gt;Symbol&lt;/CODE&gt;, but my answer will assume that was an oversight, as I'm not sure where else it would have come from. Based on your comments below, I think I understand now that your requirement for the Volume field is this: at some point, it was 0, and at some other point (not necessarily &lt;EM&gt;after&lt;/EM&gt;) it was greater than 1.&lt;/P&gt;

&lt;P&gt;Assuming that's true, here is a search that should address your needs:&lt;BR /&gt;
&lt;CODE&gt;Change&amp;gt;1 AND Price&amp;gt;0.001 | eval has_been_zero_volume=if(Volume=0, 1, NULL) | eventstats values(has_been_zero_volume) AS has_been_zero_volume BY Symbol | where isnotnull(has_been_zero_volume) AND AND Volume&amp;gt;1 | table Symbol Volume Change Price&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The resulting table should have four fields:  &lt;CODE&gt;Symbol&lt;/CODE&gt;,  &lt;CODE&gt;Volume&lt;/CODE&gt;,  &lt;CODE&gt;Change&lt;/CODE&gt;, and  &lt;CODE&gt;Price&lt;/CODE&gt;. If you click on any one of those field headers, you should be able to sort the results in ascending or descending order.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 02:22:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307428#M57897</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2017-10-14T02:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use the Splunk UI to sort our data by each column, or does that need to be in the search syntax?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307429#M57898</link>
      <description>&lt;P&gt;Hi garethatiag, &lt;/P&gt;

&lt;P&gt;Thanks for your reply.  &lt;/P&gt;

&lt;P&gt;Yes, we will need the dependency to where the value must have been 0.00000 a some point in time - within the results, and has at least 1 day to where it has changed to above zero (i.e.:  1.12345 or 0.12345).  Otherwise, results should not display.  &lt;/P&gt;

&lt;P&gt;So if volume for a particular Symbol was...&lt;BR /&gt;
day 1 = 0.00000&lt;BR /&gt;
day 2 = 0.00000&lt;BR /&gt;
day 3 = 0.00000&lt;BR /&gt;
day 4 = 1.12345&lt;BR /&gt;
(csv was loaded 4 times in 4 days). &lt;/P&gt;

&lt;P&gt;this WOULD qualify as a successful result.&lt;/P&gt;

&lt;P&gt;Side note:  Does Splunk handle a certain decimal value by default?  If not, do we need to specify this to support x number of decimal places to allow values that are as low as 0.00001.  I just don't want an automatic round up to decimal.  &lt;/P&gt;

&lt;P&gt;Thanks.   &lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 02:31:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307429#M57898</guid>
      <dc:creator>agoktas</dc:creator>
      <dc:date>2017-10-14T02:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use the Splunk UI to sort our data by each column, or does that need to be in the search syntax?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307430#M57899</link>
      <description>&lt;P&gt;Ok, so if you test appending one of my mentioned searches onto your existing CSV lookup it might work...if not someone else has provided an alternative answer as well.&lt;/P&gt;

&lt;P&gt;Since Splunk will be treating this as raw data I could not find a mention of any precision limitations, I did find the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Eval"&gt;eval command&lt;/A&gt; uses &lt;A href="https://en.wikipedia.org/wiki/Double-precision_floating-point_format"&gt;double precision floating point&lt;/A&gt; numbers when doing calculations.&lt;/P&gt;

&lt;P&gt;Feel free to like if these posts were helpful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 02:51:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307430#M57899</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2017-10-14T02:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use the Splunk UI to sort our data by each column, or does that need to be in the search syntax?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307431#M57900</link>
      <description>&lt;P&gt;Looking over this again, I think there are a few issues. First, if you are loading a CSV each day that has only four columns ( &lt;CODE&gt;Symbol&lt;/CODE&gt;, &lt;CODE&gt;Volume&lt;/CODE&gt;, &lt;CODE&gt;Change&lt;/CODE&gt;, and &lt;CODE&gt;Price&lt;/CODE&gt;), then we have no _time field (or anything equivalent). Thus, I'm not sure we can be certain to return results where the Volume has been 0 in the &lt;EM&gt;past&lt;/EM&gt; and have subsequently moved above 0 - at least not without some guarantee that either the newer results are above the older results, or vice versa.&lt;/P&gt;

&lt;P&gt;Furthermore, I am not sure what you want the output to be. I assume the first column will be &lt;CODE&gt;Symbol&lt;/CODE&gt;, but then you have potentially many values for &lt;CODE&gt;Volume&lt;/CODE&gt;, &lt;CODE&gt;Change&lt;/CODE&gt;, and &lt;CODE&gt;Price&lt;/CODE&gt;. Do you want the max of each, the average of each, the most recent value for each, etc.? &lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 02:59:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307431#M57900</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2017-10-14T02:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use the Splunk UI to sort our data by each column, or does that need to be in the search syntax?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307432#M57901</link>
      <description>&lt;P&gt;The time stamp on when the csv was loaded is sufficient.  Can we simply use the timestamp of when the entries were loaded.  &lt;/P&gt;

&lt;P&gt;The goal is to have results that match the following criteria:&lt;BR /&gt;&lt;BR /&gt;
1) Match all 3 value requirements (listed above)&lt;BR /&gt;
2) At least one occurrence of "Volume" was equal to zero (0.0000) within the search time range (all time or 1 week for example).  &lt;/P&gt;

&lt;P&gt;Hopefully this helps  clarify.  &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 04:10:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307432#M57901</guid>
      <dc:creator>agoktas</dc:creator>
      <dc:date>2017-10-14T04:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use the Splunk UI to sort our data by each column, or does that need to be in the search syntax?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307433#M57902</link>
      <description>&lt;P&gt;I updated my answer, so I think it now meets all of your requirements. Give it a try!&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 22:28:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-we-use-the-Splunk-UI-to-sort-our-data-by-each-column-or-does/m-p/307433#M57902</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2017-10-14T22:28:30Z</dc:date>
    </item>
  </channel>
</rss>

