<?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 How to calculate row sum which each column has different weight? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-row-sum-which-each-column-has-different-weight/m-p/372042#M109455</link>
    <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;I have a table as below. &lt;/P&gt;

&lt;P&gt;severity                 S0      S1     S2    S3&lt;BR /&gt;
event A                  1         0       0      0&lt;BR /&gt;
event B                  0         2       0      0&lt;BR /&gt;
event C                  0         1       1      0 &lt;/P&gt;

&lt;P&gt;each column has different weight. for example S0 = 1,000,000, S1 = 10,000, S2 = 100, S3 = 1. i want to sort the event based on the weight multiply by the event number. &lt;BR /&gt;
Please advise.&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2017 14:59:00 GMT</pubDate>
    <dc:creator>hakusama1024</dc:creator>
    <dc:date>2017-05-10T14:59:00Z</dc:date>
    <item>
      <title>How to calculate row sum which each column has different weight?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-row-sum-which-each-column-has-different-weight/m-p/372042#M109455</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;I have a table as below. &lt;/P&gt;

&lt;P&gt;severity                 S0      S1     S2    S3&lt;BR /&gt;
event A                  1         0       0      0&lt;BR /&gt;
event B                  0         2       0      0&lt;BR /&gt;
event C                  0         1       1      0 &lt;/P&gt;

&lt;P&gt;each column has different weight. for example S0 = 1,000,000, S1 = 10,000, S2 = 100, S3 = 1. i want to sort the event based on the weight multiply by the event number. &lt;BR /&gt;
Please advise.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 14:59:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-row-sum-which-each-column-has-different-weight/m-p/372042#M109455</guid>
      <dc:creator>hakusama1024</dc:creator>
      <dc:date>2017-05-10T14:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate row sum which each column has different weight?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-row-sum-which-each-column-has-different-weight/m-p/372043#M109456</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;P&gt;| eval weight=(S0*1000000 +  S1*10000 + S2*100 + S3*1)&lt;BR /&gt;
| sort 0 - weight&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:00:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-row-sum-which-each-column-has-different-weight/m-p/372043#M109456</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2020-09-29T14:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate row sum which each column has different weight?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-row-sum-which-each-column-has-different-weight/m-p/372044#M109457</link>
      <description>&lt;P&gt;thank you sir. &lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 15:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-row-sum-which-each-column-has-different-weight/m-p/372044#M109457</guid>
      <dc:creator>hakusama1024</dc:creator>
      <dc:date>2017-05-10T15:38:04Z</dc:date>
    </item>
  </channel>
</rss>

