<?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: Is there a way I can make average two columns value based on requirements? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616036#M214077</link>
    <description>&lt;P&gt;Thank you very much again, I need in total average not another rows and column with average &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2022 16:27:52 GMT</pubDate>
    <dc:creator>alakdam</dc:creator>
    <dc:date>2022-10-05T16:27:52Z</dc:date>
    <item>
      <title>Make average compare with two columns value based and display it in Panel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616015#M214067</link>
      <description>&lt;P&gt;I have two two columns of data, One is Expected box and another is Actual box.&amp;nbsp; I would like to make&amp;nbsp;&lt;STRONG&gt;Percentage/Average&lt;/STRONG&gt; of how much actual Box values are missing compare with&amp;nbsp;Expected box.&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;Also some one my&amp;nbsp;Actual boxes data there are no(which null/undefined)&amp;nbsp; value.&amp;nbsp;&amp;nbsp;&lt;FONT color="#000000"&gt;I would like to ignore those rows&amp;nbsp; where&amp;nbsp;Actual boxes are&amp;nbsp;&amp;nbsp;(null/undefined) which is compare with my&amp;nbsp;Expected box.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;PS:&amp;nbsp;&lt;/SPAN&gt;I am beginner level splunker ?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Is there any way I can do this&amp;nbsp;&lt;STRONG&gt;Average based on requirements?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This my search query:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index::service sourcetype::service "order_tote_analytics" | spath "data.order_number" | search "data.order_number"=* |  spath path=data{}.actual_totes{}.finalBoxAmount output=actualBox| spath path=data{}.estimated_totes{}.box output=estimatedBox | table estimatedBox actualBox&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;STRONG&gt;This my table looks like&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-05 at 18.02.57.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21904i6AC48D9220B10EA3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-10-05 at 18.02.57.png" alt="Screenshot 2022-10-05 at 18.02.57.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;PS: I would love to display that&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;Percentage of actual values missing in single panel&lt;/FONT&gt;, It would nice to&amp;nbsp;&lt;FONT color="#000000"&gt;show me, how to do that? This is wrong search query &lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_down:"&gt;👇🏾&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_down:"&gt;👇🏾&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_down:"&gt;👇🏾&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Percentage of actual values missing&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index::service sourcetype::service "order_tote_analytics" | spath "data.order_number" | search "data.order_number"=$orderNumber$ |  spath path=data{}.actual_totes{}.finalBoxAmount output=finalBox| spath path=data{}.estimated_totes{}.box output=estimatedBox | stats sum(estimatedBox) as totalBox, sum(finalBox) as finalbox&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$chosenTimePeriod.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$chosenTimePeriod.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051","0xf1813f","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="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;</description>
      <pubDate>Wed, 05 Oct 2022 16:20:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616015#M214067</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-05T16:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way I can make average two columns value based on requirements?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616021#M214070</link>
      <description>&lt;P&gt;Try this query&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index::service sourcetype::service "order_tote_analytics" 
| spath "data.order_number" | search "data.order_number"=* 
| spath path=data{}.actual_totes{}.finalBoxAmount output=actualBox
| spath path=data{}.estimated_totes{}.box output=estimatedBox
| fields estimatedBox actualBox
```Compute the % of missed boxes, ignoring empty actualBox entries```
| eval pctMissed=if(isnull(actualBox), null(), round((estimatedBox-actualBox) * 100 / estimatedBox, 2))
| table estimatedBox actualBox pctMissed
```Add the average of all pctMissed values on the end```
| appendpipe [ stats avg(pctMissed) as pctMissed | eval estimatedBox="Average Missed" ]&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Oct 2022 15:38:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616021#M214070</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-05T15:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way I can make average two columns value based on requirements?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616030#M214075</link>
      <description>&lt;P&gt;Thank you very much. I am super new in splunk. Can you please show me In this panel ui, how to implement it.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Percentage of actual values missing&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index::service sourcetype::service "order_tote_analytics" | spath "data.order_number" | search "data.order_number"=$orderNumber$ |  spath path=data{}.actual_totes{}.finalBoxAmount output=finalBox| spath path=data{}.estimated_totes{}.box output=estimatedBox | stats sum(estimatedBox) as totalBox, sum(finalBox) as finalbox&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$chosenTimePeriod.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$chosenTimePeriod.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051","0xf1813f","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="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;This is how I want to show:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-05 at 18.47.35.png" style="width: 351px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21905iECBC072DB16023BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-10-05 at 18.47.35.png" alt="Screenshot 2022-10-05 at 18.47.35.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 15:47:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616030#M214075</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-05T15:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way I can make average two columns value based on requirements?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616036#M214077</link>
      <description>&lt;P&gt;Thank you very much again, I need in total average not another rows and column with average &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 16:27:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616036#M214077</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-05T16:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way I can make average two columns value based on requirements?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616038#M214078</link>
      <description>&lt;P&gt;Thank you for clarifying the desired result.&amp;nbsp; This code should produce it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;panel&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;title&amp;gt;Percentage of actual values missing&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index::service sourcetype::service "order_tote_analytics" 
| spath "data.order_number" 
| search "data.order_number"=$orderNumber$ 
| spath path=data{}.actual_totes{}.finalBoxAmount output=finalBox
| spath path=data{}.estimated_totes{}.box output=estimatedBox 
| stats sum(estimatedBox) as totalBox, sum(finalBox) as finalbox
| eval pctMissing = (totalBox - finalBox) * 100 / finalbox
| table pctMissing&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$chosenTimePeriod.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$chosenTimePeriod.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x53a051","0xf1813f","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="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Oct 2022 16:44:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616038#M214078</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-05T16:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way I can make average two columns value based on requirements?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616041#M214079</link>
      <description>&lt;P&gt;I am not getting&amp;nbsp; anything.&amp;nbsp; There are two finalBox you defined:&amp;nbsp; one we got as &lt;FONT color="#993300"&gt;output=finalBox&lt;/FONT&gt; and another is&amp;nbsp;&lt;FONT color="#993300"&gt;sum(finalBox) as finalbox,&amp;nbsp;&lt;FONT color="#000000"&gt;is this the reason I am not getting anything.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath path=data{}.actual_totes{}.finalBoxAmount output=finalBox
| spath path=data{}.estimated_totes{}.box output=estimatedBox 
| stats sum(estimatedBox) as totalBox, sum(finalBox) as finalbox
| eval pctMissing = (totalBox - finalBox) * 100 / finalbox
| table pctMissing&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-05 at 19.52.17.png" style="width: 670px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21907iE4438B2DB9741FE8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-10-05 at 19.52.17.png" alt="Screenshot 2022-10-05 at 19.52.17.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 16:56:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616041#M214079</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-05T16:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way I can make average two columns value based on requirements?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616172#M214149</link>
      <description>&lt;P&gt;There is a typo in my response ('finalbox' is not the same as 'finalBox').&amp;nbsp; Try this, instead.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath path=data{}.actual_totes{}.finalBoxAmount output=finalBox
| spath path=data{}.estimated_totes{}.box output=estimatedBox 
| stats sum(estimatedBox) as totalBox, sum(finalBox) as finalBox
| eval pctMissing = (totalBox - finalBox) * 100 / finalBox
| table pctMissing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 12:54:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616172#M214149</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-06T12:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way I can make average two columns value based on requirements?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616178#M214153</link>
      <description>&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏🏾&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏🏾&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏🏾&lt;/span&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 13:54:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-average-compare-with-two-columns-value-based-and-display-it/m-p/616178#M214153</guid>
      <dc:creator>alakdam</dc:creator>
      <dc:date>2022-10-06T13:54:26Z</dc:date>
    </item>
  </channel>
</rss>

