<?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: Filter values in timechart for eval method in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Filter-values-in-timechart-for-eval-method/m-p/361307#M106717</link>
    <description>&lt;P&gt;Hello can you try this please,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;DropDownSelect&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="sid"&amp;gt;
      &amp;lt;label&amp;gt;sid1&amp;lt;/label&amp;gt;
      &amp;lt;choice value="ALL"&amp;gt;*&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="sid1"&amp;gt;sid1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="sid2"&amp;gt;sid2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="sid3"&amp;gt;sid3&amp;lt;/choice&amp;gt;

    &amp;lt;/input&amp;gt;

    &amp;lt;input type="dropdown" token="did"&amp;gt;
      &amp;lt;label&amp;gt;sid1&amp;lt;/label&amp;gt;
      &amp;lt;choice value="ALL"&amp;gt;*&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="did1"&amp;gt;did1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="did2"&amp;gt;did2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="did3"&amp;gt;did3&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;

     &amp;lt;input type="dropdown" token="lun"&amp;gt;
      &amp;lt;label&amp;gt;sid1&amp;lt;/label&amp;gt;
      &amp;lt;choice value="ALL"&amp;gt;*&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="lun1"&amp;gt;lun1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="lun2"&amp;gt;lun2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="lun3"&amp;gt;lun3&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;

  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="test19" sid=$sids$ did=$dids$ lun=$luns$|fields sid,did,lun,readio|eval combination=sid."-".did."-".lun | eval res = readio / 1 | timechart span=60 avg(res) as AVG usenull=f by combination&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 25 Apr 2018 08:13:50 GMT</pubDate>
    <dc:creator>TISKAR</dc:creator>
    <dc:date>2018-04-25T08:13:50Z</dc:date>
    <item>
      <title>Filter values in timechart for eval method</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-values-in-timechart-for-eval-method/m-p/361306#M106716</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
This is related to the question asked earlier&lt;BR /&gt;
link: [&lt;A href="https://answers.splunk.com/answers/643007/timechart-query-with-multiple-values-after-by.html#answer-642274"&gt;https://answers.splunk.com/answers/643007/timechart-query-with-multiple-values-after-by.html#answer-642274&lt;/A&gt;]&lt;/P&gt;

&lt;P&gt;eval combination=sid."-".did."-".lun&lt;/P&gt;

&lt;P&gt;for this sid,did and lun now i have three dropdowns where at page load first the sid gets filled up. Then upon selection of one sid , corresponding dids gets filled up, and selecting a did finally the lun dropdown gets filled up.&lt;BR /&gt;
This is done.&lt;BR /&gt;
The thing is if i do not select any of these the query in a panel should show result for all as below:&lt;BR /&gt;
index="test19"|fields sid,did,lun,readio|eval combination=sid."-".did."-".lun | eval res = readio / 1 | timechart span=60 avg(res) as AVG usenull=f by combination&lt;/P&gt;

&lt;P&gt;But if I select specific values of sid,did,lun from dropdowns then query should show only for those selected :&lt;BR /&gt;
index="test19" sid=$sids$ did=$dids$ lun=$luns$|fields sid,did,lun,readio|eval combination=sid."-".did."-".lun | eval res = readio / 1 | timechart span=60 avg(res) as AVG usenull=f by combination&lt;/P&gt;

&lt;P&gt;I have used "Dynamic Options"-&amp;gt;search string to prefill the dropdowns. Now with this the "Token Options"-&amp;gt;Default gets disabled, I cant add a default value so that if dropdown is not selected it takes for eg "" for lun=$$.&lt;/P&gt;

&lt;P&gt;Also i need to change the eval part : eval combination=sid."-".did."-".lun&lt;BR /&gt;
i.e if lun is not select in dropdown means all luns so it should be like&lt;BR /&gt;
eval combination=sid."-".did &lt;BR /&gt;
and not&lt;BR /&gt;
eval combination=sid."-".did."-".lun&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 07:33:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-values-in-timechart-for-eval-method/m-p/361306#M106716</guid>
      <dc:creator>sawgata12345</dc:creator>
      <dc:date>2018-04-25T07:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Filter values in timechart for eval method</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-values-in-timechart-for-eval-method/m-p/361307#M106717</link>
      <description>&lt;P&gt;Hello can you try this please,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;DropDownSelect&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="dropdown" token="sid"&amp;gt;
      &amp;lt;label&amp;gt;sid1&amp;lt;/label&amp;gt;
      &amp;lt;choice value="ALL"&amp;gt;*&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="sid1"&amp;gt;sid1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="sid2"&amp;gt;sid2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="sid3"&amp;gt;sid3&amp;lt;/choice&amp;gt;

    &amp;lt;/input&amp;gt;

    &amp;lt;input type="dropdown" token="did"&amp;gt;
      &amp;lt;label&amp;gt;sid1&amp;lt;/label&amp;gt;
      &amp;lt;choice value="ALL"&amp;gt;*&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="did1"&amp;gt;did1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="did2"&amp;gt;did2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="did3"&amp;gt;did3&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;

     &amp;lt;input type="dropdown" token="lun"&amp;gt;
      &amp;lt;label&amp;gt;sid1&amp;lt;/label&amp;gt;
      &amp;lt;choice value="ALL"&amp;gt;*&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="lun1"&amp;gt;lun1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="lun2"&amp;gt;lun2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="lun3"&amp;gt;lun3&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;

  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="test19" sid=$sids$ did=$dids$ lun=$luns$|fields sid,did,lun,readio|eval combination=sid."-".did."-".lun | eval res = readio / 1 | timechart span=60 avg(res) as AVG usenull=f by combination&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Apr 2018 08:13:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-values-in-timechart-for-eval-method/m-p/361307#M106717</guid>
      <dc:creator>TISKAR</dc:creator>
      <dc:date>2018-04-25T08:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Filter values in timechart for eval method</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-values-in-timechart-for-eval-method/m-p/361308#M106718</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
The dropdown part is working, had to change&lt;BR /&gt;&lt;BR /&gt;
the option for all the dropdown "ALL" to *&lt;/P&gt;

&lt;P&gt;For the second part of the query:&lt;BR /&gt;
Also i need to change the eval part : eval combination=sid."-".did."-".lun&lt;BR /&gt;
i.e if lun is not select in dropdown means all luns so it should be like&lt;BR /&gt;
eval combination=sid."-".did &lt;BR /&gt;
and not&lt;BR /&gt;
eval combination=sid."-".did."-".lun&lt;/P&gt;

&lt;P&gt;I have created three checkboxes: &lt;BR /&gt;
how to check if a checkbox is selected and put the specific value for eval:&lt;BR /&gt;
 os if we select the sid checkbox only&lt;BR /&gt;
eval combination=sid&lt;BR /&gt;
if i select sid and did checkboxes&lt;BR /&gt;
eval combination=sid."-".did&lt;BR /&gt;
and if i select sid did and lun checkboxes&lt;BR /&gt;
eval combination=sid."-".did."-".lun&lt;/P&gt;

&lt;P&gt;The final value for combination in the below query should be after checking the selected checkboxes. How to check selected checkbox in a if condition inside the eval statement.&lt;/P&gt;

&lt;P&gt;index="test19" sid="&lt;EM&gt;" did="&lt;/EM&gt;" lun="*"|fields sid,did,lun,readio|eval combination=sid."-".did."-".lun | eval res = readio / 1 | timechart span=60 avg(res) as AVG usenull=f by combination&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 10:38:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-values-in-timechart-for-eval-method/m-p/361308#M106718</guid>
      <dc:creator>sawgata12345</dc:creator>
      <dc:date>2018-04-27T10:38:26Z</dc:date>
    </item>
  </channel>
</rss>

