<?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: Search 1 dashboard panel - Search 2 dashboard panel = third dashboard panel   difference between two searches. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-1-dashboard-panel-Search-2-dashboard-panel-third/m-p/563298#M196261</link>
    <description>&lt;P&gt;Add a &lt;FONT face="courier new,courier"&gt;&amp;lt;done&amp;gt;&lt;/FONT&gt; element to each of the first panels and have it set a token with the value calculated by each panel.&amp;nbsp; You may find it easier to use the &lt;FONT face="courier new,courier"&gt;AS&lt;/FONT&gt; clause of the stats command to save the value in a field with a simple name.&amp;nbsp; The third panel will use the two tokens to compute the final result.&lt;/P&gt;&lt;P&gt;Below is a rough untested idea of how to do it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;row&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;singleValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index="signa_pool" name!="Pir8Radio"| stats sum(pendingBalanceNum) as Value1&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;done&amp;gt;
        &amp;lt;set token=Panel1Value&amp;gt;$result.Value1$&amp;lt;/set&amp;gt;
      &amp;lt;/done&amp;gt;
    &amp;lt;/singleValue&amp;gt;
  &amp;lt;/panel&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;singleValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index="signum_node" | stats latest(guaranteedBalanceNQT) as PoolBal | eval PoolBal=round(PoolBal/100000000,4)&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;done&amp;gt;
        &amp;lt;set token=Panel2Value&amp;gt;$result.PoolBal$&amp;lt;/set&amp;gt;
      &amp;lt;/done&amp;gt;
    &amp;lt;/singleValue&amp;gt;
  &amp;lt;/panel&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;singleValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;| makeresults | eval Excess=$Panel2Value$ - $Panel1Value$&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
    &amp;lt;/singleValue&amp;gt;
  &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 14 Aug 2021 20:28:57 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-08-14T20:28:57Z</dc:date>
    <item>
      <title>Search 1 dashboard panel - Search 2 dashboard panel = third dashboard panel   difference between two searches.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-1-dashboard-panel-Search-2-dashboard-panel-third/m-p/563290#M196260</link>
      <description>&lt;P&gt;Search 1 dashboard panel - Search 2 dashboard panel = third dashboard panel difference between two searches.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my first search:&lt;/P&gt;&lt;P&gt;index="signa_pool" name!="Pir8Radio"| stats sum(pendingBalanceNum)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The result of the above is :&amp;nbsp; 595.3440&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here is my second search:&lt;/P&gt;&lt;P&gt;index="signum_node" | stats latest(guaranteedBalanceNQT) as PoolBal | eval PoolBal=round(PoolBal/100000000,4)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The result of the above is: 1,904.5167&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I need the third dashboard panel to take 1,904.5167 - 595.3440 = &lt;STRONG&gt;1,309.1727&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MY QUESTION:&amp;nbsp; How can I either create my end search that equals 1,309.1727 or how can i store previous search results as a variable to use in the third panel?&amp;nbsp; &amp;nbsp; &amp;nbsp; I'm stuck lol, tried for about an hour, so any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pir8radio_0-1628966623145.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15571iA631CF112F216D39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pir8radio_0-1628966623145.png" alt="pir8radio_0-1628966623145.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 18:44:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-1-dashboard-panel-Search-2-dashboard-panel-third/m-p/563290#M196260</guid>
      <dc:creator>pir8radio</dc:creator>
      <dc:date>2021-08-14T18:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Search 1 dashboard panel - Search 2 dashboard panel = third dashboard panel   difference between two searches.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-1-dashboard-panel-Search-2-dashboard-panel-third/m-p/563298#M196261</link>
      <description>&lt;P&gt;Add a &lt;FONT face="courier new,courier"&gt;&amp;lt;done&amp;gt;&lt;/FONT&gt; element to each of the first panels and have it set a token with the value calculated by each panel.&amp;nbsp; You may find it easier to use the &lt;FONT face="courier new,courier"&gt;AS&lt;/FONT&gt; clause of the stats command to save the value in a field with a simple name.&amp;nbsp; The third panel will use the two tokens to compute the final result.&lt;/P&gt;&lt;P&gt;Below is a rough untested idea of how to do it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;row&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;singleValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index="signa_pool" name!="Pir8Radio"| stats sum(pendingBalanceNum) as Value1&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;done&amp;gt;
        &amp;lt;set token=Panel1Value&amp;gt;$result.Value1$&amp;lt;/set&amp;gt;
      &amp;lt;/done&amp;gt;
    &amp;lt;/singleValue&amp;gt;
  &amp;lt;/panel&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;singleValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index="signum_node" | stats latest(guaranteedBalanceNQT) as PoolBal | eval PoolBal=round(PoolBal/100000000,4)&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;done&amp;gt;
        &amp;lt;set token=Panel2Value&amp;gt;$result.PoolBal$&amp;lt;/set&amp;gt;
      &amp;lt;/done&amp;gt;
    &amp;lt;/singleValue&amp;gt;
  &amp;lt;/panel&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;singleValue&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;| makeresults | eval Excess=$Panel2Value$ - $Panel1Value$&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
    &amp;lt;/singleValue&amp;gt;
  &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 20:28:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-1-dashboard-panel-Search-2-dashboard-panel-third/m-p/563298#M196261</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-14T20:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Search 1 dashboard panel - Search 2 dashboard panel = third dashboard panel   difference between two searches.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-1-dashboard-panel-Search-2-dashboard-panel-third/m-p/563300#M196263</link>
      <description>&lt;P&gt;Here is what I had to change for anyone else looking,&amp;nbsp; &amp;nbsp;had to add " " to the token=XXXX value, and had to put the &amp;lt;done&amp;gt; block within the &amp;lt;search&amp;gt; blocks.&amp;nbsp; &amp;nbsp; Thanks Rich.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Server Pending Payout&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="signa_pool" name!="Pir8Radio"|  stats sum(pendingBalanceNum) as PendingBalance&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-2m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;set token="Panel1Value"&amp;gt;$result.PendingBalance$&amp;lt;/set&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="numberPrecision"&amp;gt;0.000&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="unit"&amp;gt;SIGNA&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Pool Account Balance&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index="signum_node" | stats latest(guaranteedBalanceNQT) as PoolBal | eval PoolBal=round(PoolBal/100000000,4)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-2m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;set token="Panel2Value"&amp;gt;$result.PoolBal$&amp;lt;/set&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="height"&amp;gt;114&amp;lt;/option&amp;gt;
        &amp;lt;option name="numberPrecision"&amp;gt;0.000&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="unit"&amp;gt;SIGNA&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Pool Excess&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults | eval Excess=$Panel2Value$ - $Panel1Value$&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-2m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="height"&amp;gt;111&amp;lt;/option&amp;gt;
        &amp;lt;option name="numberPrecision"&amp;gt;0.000&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="unit"&amp;gt;SIGNA&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 21:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-1-dashboard-panel-Search-2-dashboard-panel-third/m-p/563300#M196263</guid>
      <dc:creator>pir8radio</dc:creator>
      <dc:date>2021-08-14T21:25:31Z</dc:date>
    </item>
  </channel>
</rss>

