<?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 combine my two searches and render dynamic ranges for a Radial Gauge? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157235#M44245</link>
    <description>&lt;P&gt;I guess you can add the guage ranges in the main search query itself&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source =/opt/data/splunkLogs/order_transaction.log ProductName="$DEVICE1$-$STORAGE1$-$COLOR1$" | dedup OrderId | stats sum(SKUQuantity) as TotalDevices | guage TotalDevices [|gentimes start=-1 | lookup inventorylookup Devicename as $DEVICE1$-$STORAGE1$-$COLOR1$ OUTPUT AllocTotal | eval y1=round(AllocTotal*0.5, 2) | eval y2=round(AllocTotal*0.8, 2) | eval y3=AllocTotal | eval rs="0,"+y1+","+y2+","+y3 | fields rs | rename rs as search ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The subquery would return the guage limits for the main search to use.&lt;BR /&gt;
This worked for me for a search where I am doing an eval to determine the value for the ranges so I &lt;EM&gt;think&lt;/EM&gt; it should work for inputlookup as well.&lt;/P&gt;

&lt;P&gt;Let me know how it goes.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Feb 2015 04:49:37 GMT</pubDate>
    <dc:creator>ramdaspr</dc:creator>
    <dc:date>2015-02-23T04:49:37Z</dc:date>
    <item>
      <title>How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157234#M44244</link>
      <description>&lt;P&gt;I have a Drop-down box from where I get the type of Device chosen and depending on the chosen device I need to dynamically get the ranges and render it in a Radial Gauge. Then calculate the total devices sold.&lt;/P&gt;

&lt;H1&gt;The query works for static values like this&lt;/H1&gt;

&lt;PRE&gt;&lt;CODE&gt;source =/opt/data/splunkLogs/order_transaction.log ProductName="$DEVICE1$-$STORAGE1$-$COLOR1$" | dedup OrderId | stats sum(SKUQuantity) as TotalDevices


 &amp;lt;option name="charting.chart.rangeValues"&amp;gt;["0","600000","1400000","2000000"]&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can calculate the ranges dynamically using a lookup table  and eval,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lookup inventorylookup Devicename as $DEVICE1$-$STORAGE1$-$COLOR1$ OUTPUT AllocTotal | eval y1=round(AllocTotal*0.5, 2) | eval y2=round(AllocTotal*0.8, 2) | eval y3=AllocTotal | gauge count 0 y1 y2 y3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Q1. Now how to I render these ranges on the gauge?&lt;BR /&gt;
Q2. How do I combine both the search queries into one?&lt;/P&gt;

&lt;P&gt;Tried all options to render like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.chart.rangeValues"&amp;gt;[x, y1, y2, y3]&amp;lt;/option&amp;gt;

OR

&amp;lt;option name="charting.chart.rangeValues"&amp;gt;[$x$, $y1$, $y2$, $y3$]&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 22 Feb 2015 14:57:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157234#M44244</guid>
      <dc:creator>rajendra_b</dc:creator>
      <dc:date>2015-02-22T14:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157235#M44245</link>
      <description>&lt;P&gt;I guess you can add the guage ranges in the main search query itself&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source =/opt/data/splunkLogs/order_transaction.log ProductName="$DEVICE1$-$STORAGE1$-$COLOR1$" | dedup OrderId | stats sum(SKUQuantity) as TotalDevices | guage TotalDevices [|gentimes start=-1 | lookup inventorylookup Devicename as $DEVICE1$-$STORAGE1$-$COLOR1$ OUTPUT AllocTotal | eval y1=round(AllocTotal*0.5, 2) | eval y2=round(AllocTotal*0.8, 2) | eval y3=AllocTotal | eval rs="0,"+y1+","+y2+","+y3 | fields rs | rename rs as search ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The subquery would return the guage limits for the main search to use.&lt;BR /&gt;
This worked for me for a search where I am doing an eval to determine the value for the ranges so I &lt;EM&gt;think&lt;/EM&gt; it should work for inputlookup as well.&lt;/P&gt;

&lt;P&gt;Let me know how it goes.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 04:49:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157235#M44245</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-02-23T04:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157236#M44246</link>
      <description>&lt;P&gt;Thanks Ramdaspr for a quick response. &lt;/P&gt;

&lt;P&gt;The gauge data is working but the ranges are not displaying, (its displaying default 1 to 100). The ranges are in a lookup table so it has to be picked only once based on the dropdown selection. The TotalDevices should be calculated for every event, which is it doing now.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 13:03:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157236#M44246</guid>
      <dc:creator>rajendra_b</dc:creator>
      <dc:date>2015-02-23T13:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157237#M44247</link>
      <description>&lt;P&gt;What is the result you get when you run the subsearch alone?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|gentimes start=-1 | lookup inventorylookup Devicename as $DEVICE1$-$STORAGE1$-$COLOR1$ OUTPUT AllocTotal | eval y1=round(AllocTotal*0.5, 2) | eval y2=round(AllocTotal*0.8, 2) | eval y3=AllocTotal | eval rs="0,"+y1+","+y2+","+y3 | fields rs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I didnt notice this earlier, but you seem to be rounding the y values to 2 decimal places.. Is that required and can you try the query by rounding it up instead?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|gentimes start=-1 | lookup inventorylookup Devicename as $DEVICE1$-$STORAGE1$-$COLOR1$ OUTPUT AllocTotal | eval y1=round(AllocTotal*0.5, 0) | eval y2=round(AllocTotal*0.8, 0) | eval y3=AllocTotal | eval rs="0,"+y1+","+y2+","+y3 | fields rs
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Feb 2015 13:12:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157237#M44247</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-02-23T13:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157238#M44248</link>
      <description>&lt;P&gt;Hi Rajendra,&lt;BR /&gt;
You could create a SearchManager in JS to set tokens, and then use these in your source code to set the ranges.&lt;/P&gt;

&lt;P&gt;It might be worth taking a look at them.  &lt;/P&gt;

&lt;P&gt;&lt;A href="http://dev.splunk.com/view/webframework-features/SP-CAAAEM8"&gt;http://dev.splunk.com/view/webframework-features/SP-CAAAEM8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 13:12:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157238#M44248</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2015-02-23T13:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157239#M44249</link>
      <description>&lt;P&gt;I get rs as 1, when I run the sub-search. You are correct the rounding off is not needed.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 15:35:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157239#M44249</guid>
      <dc:creator>rajendra_b</dc:creator>
      <dc:date>2015-02-23T15:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157240#M44250</link>
      <description>&lt;P&gt;Thanks Mark, I will take a look at this. Can you share some examples if you can?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 15:56:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157240#M44250</guid>
      <dc:creator>rajendra_b</dc:creator>
      <dc:date>2015-02-23T15:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157241#M44251</link>
      <description>&lt;P&gt;Hi Rajendra, can you share the final query/ setup which worked for you? I'd like to see if this answer works for my setup as well..&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 22:33:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157241#M44251</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-02-23T22:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157242#M44252</link>
      <description>&lt;P&gt;you shouldnt be getting rs as 1 since its been concatenated to provide something like 0,1,200,500. &lt;BR /&gt;
Have you replaced the tokens with the actual data for trying out this query?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2015 22:39:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157242#M44252</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-02-23T22:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157243#M44253</link>
      <description>&lt;P&gt;Sorry, mgmt changed the priority suddenly and I was busy the whole day fixing other stuff. But here is my whole code for this chart. The gauge count is calculated but the ranges are not.&lt;/P&gt;

&lt;P&gt;I have tried several permutation and combinations of your answers but never got the ranges.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
          &amp;lt;input type="dropdown" searchWhenChanged="true" token="DEVICE1"&amp;gt;
            &amp;lt;label&amp;gt;Device&amp;lt;/label&amp;gt;
            &amp;lt;choice value="*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
            &amp;lt;choice value="iPhone6"&amp;gt;iPhone6&amp;lt;/choice&amp;gt;
            &amp;lt;choice value="iPhone6Plus"&amp;gt;iPhone6Plus&amp;lt;/choice&amp;gt;
            &amp;lt;default&amp;gt;ALL&amp;lt;/default&amp;gt;
          &amp;lt;/input&amp;gt;
          &amp;lt;input type="dropdown" searchWhenChanged="true" token="STORAGE1"&amp;gt;
            &amp;lt;label&amp;gt;Storage&amp;lt;/label&amp;gt;
            &amp;lt;choice value="*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
            &amp;lt;choice value="16GB"&amp;gt;16GB&amp;lt;/choice&amp;gt;
            &amp;lt;choice value="64GB"&amp;gt;64GB&amp;lt;/choice&amp;gt;
            &amp;lt;choice value="128GB"&amp;gt;128GB&amp;lt;/choice&amp;gt;
            &amp;lt;default&amp;gt;ALL&amp;lt;/default&amp;gt;
          &amp;lt;/input&amp;gt;
          &amp;lt;input type="dropdown" searchWhenChanged="true" token="COLOR1"&amp;gt;
            &amp;lt;label&amp;gt;Color&amp;lt;/label&amp;gt;
            &amp;lt;choice value="*"&amp;gt;ALL&amp;lt;/choice&amp;gt;
            &amp;lt;choice value="Gold"&amp;gt;Gold&amp;lt;/choice&amp;gt;
            &amp;lt;choice value="Silver"&amp;gt;Silver&amp;lt;/choice&amp;gt;
            &amp;lt;choice value="Black"&amp;gt;Black&amp;lt;/choice&amp;gt;
            &amp;lt;choice value="White"&amp;gt;White&amp;lt;/choice&amp;gt;
            &amp;lt;choice value="Gray"&amp;gt;Gray&amp;lt;/choice&amp;gt;
            &amp;lt;default&amp;gt;ALL&amp;lt;/default&amp;gt;
          &amp;lt;/input&amp;gt;
          &amp;lt;chart&amp;gt;
            &amp;lt;title&amp;gt;Total Device Volumes&amp;lt;/title&amp;gt;
            &amp;lt;search&amp;gt;
              &amp;lt;query&amp;gt;index=order_activation sourcetype=order_trans ProductName="$DEVICE1$-$STORAGE1$-$COLOR1$" | dedup OrderId | stats sum(SKUQuantity) as TotalDevices | gauge TotalDevices [ | lookup iPhonelookup Devicename as $DEVICE1$-$STORAGE1$-$COLOR1$ OUTPUT AllocTotal | eval y1=AllocTotal*0.5 | eval y2=AllocTotal*0.8 | eval y3=AllocTotal | eval x=0 | eval range=x+" "+y1+" "+y2+" "+y3 | return $range]&amp;lt;/query&amp;gt;
              &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
              &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
            &amp;lt;/search&amp;gt;
            &amp;lt;option name="charting.chart"&amp;gt;radialGauge&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.chart.style"&amp;gt;minimal&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.legend.labelStyle.overflowMode"&amp;gt;ellipsisMiddle&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.overflowMode"&amp;gt;ellipsisNone&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;0&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.axisTitleY2.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.axisX.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.axisY.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.axisY2.enabled"&amp;gt;false&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.axisY2.scale"&amp;gt;inherit&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.chart.bubbleMaximumSize"&amp;gt;50&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.chart.bubbleMinimumSize"&amp;gt;10&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.chart.bubbleSizeBy"&amp;gt;area&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.chart.nullValueMode"&amp;gt;gaps&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.chart.sliceCollapsingThreshold"&amp;gt;0.01&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.chart.stackMode"&amp;gt;default&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.gaugeColors"&amp;gt;[0x84E900,0xFFE800,0xBF3030]&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.layout.splitSeries"&amp;gt;0&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
            &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
            &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
            &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
            &amp;lt;option name="count"&amp;gt;10&amp;lt;/option&amp;gt;
          &amp;lt;/chart&amp;gt;
        &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Feb 2015 01:38:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157243#M44253</guid>
      <dc:creator>rajendra_b</dc:creator>
      <dc:date>2015-02-24T01:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157244#M44254</link>
      <description>&lt;P&gt;Hi Rajendra,&lt;BR /&gt;
Unfortunately I don't have any examples, just know it's possible.&lt;/P&gt;

&lt;P&gt;You could also look at using SideviewUtils - looking at it it has a ResultsValueSetter, which I believe you could use to set tokens.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2015 13:14:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157244#M44254</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2015-02-24T13:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine my two searches and render dynamic ranges for a Radial Gauge?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157245#M44255</link>
      <description>&lt;P&gt;I am going with a different approach now. Created a custom search command called dynrange and calling it like below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=order_activation sourcetype=order_trans ProductName="$DEVICE1$-$STORAGE1$-$COLOR1$" | dedup OrderId | stats sum(SKUQuantity) as TotalDevices | gauge TotalDevices [dynrange __EXECUTE__ None None $DEVICE1$-$STORAGE1$-$COLOR1$]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The search works and does not return any errors, but it is still not rendering the dynamic range on the Radial Gauge. How do I troubleshoot the custom search command, to see if it is returning the right values.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[root@ip-172-31-26-130 bin]# cat dynrange.py
#   Version 4.0
import sys
import splunk.Intersplunk
import csv
import re

(isgetinfo, sys.argv) = splunk.Intersplunk.isGetInfo(sys.argv)

if len(sys.argv) &amp;lt; 3:
    splunk.Intersplunk.parseError("3 Arguments are required")

if isgetinfo:
    splunk.Intersplunk.outputInfo(False, False, False, False, None)

results = splunk.Intersplunk.readResults(None, None, True)

file2 =  '/opt/splunk/etc/apps/search/lookups/inventory.csv'

def searchText(search_text):
    #print "search_text:", search_text
    with open(file2) as fp1:
        root = csv.reader(fp1)
        result = [i for i in root  if re.findall(search_text, i[0])]

    return result

newresult = {}
offset = 0
header = []
#countDev = 0
x = 0
y1 = 0
y2 = 0
y3 = 0
totVolume = 0
search_text = ''

if len(results) &amp;gt; 0:
    search_text = str(sys.argv[4]).strip()
    #countDev = int(sys.argv[2])
    try:
        #tmp1, tmp2, tmp3 = search_text.split("-")
        search_text = search_text.replace("*", "[^-]*")
        result = searchText(search_text)
        #pprint.pprint(result)
        for line in result:
            totVolume = totVolume + int(line[1])
            #print line
            #print line[1]
    except:
        print "wrong search text. *-*-*"

if totVolume == 0:
    totVolume = 40000

y1 = ((totVolume * 50)/100)
y2 = ((totVolume * 80)/100)
y3 = totVolume

print "Device = %s, X = %d, Y1 = %d, Y2 = %d, Y3 = %d" % (search_text, x, y1, y2, y3)

newresult['x'] = 0
header.append('x')
newresult['y1'] = y1
header.append('y1')
newresult['y2'] = y2
header.append('y2')
newresult['y3'] = y3
header.append('y3')

newresults = []

if len(newresult) &amp;gt; 0:
    newresults.append(newresult)

splunk.Intersplunk.outputResults(newresults, None, header)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Mar 2015 16:12:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-my-two-searches-and-render-dynamic-ranges-for-a/m-p/157245#M44255</guid>
      <dc:creator>rajendra_b</dc:creator>
      <dc:date>2015-03-02T16:12:14Z</dc:date>
    </item>
  </channel>
</rss>

