<?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 create a Table where each row is the result of a query and afterwards make some operations with it? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545516#M154533</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232004"&gt;@andres91302&lt;/a&gt;,&lt;BR /&gt;Try this. Here searches 2 and 3 are appended to search 1. Command eventstats is used to copy Total1 values to all the rows.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search 1 | fields A 
| stats  count(A) as Net 
| eval stage="A", Total1=Net
| append 
    [ search search 2 | fields B
    | stats count(B) as Net 
    | eval stage="B"] 
| append 
    [ search search 3 | fields C
    | stats count(C) as Net 
    | eval stage="C"] 
| eventstats max(Total1) as Total1 
| eval Conversión=(Net-Total1)/Total1 
| fields stage, Net, Conversión&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, a like would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Mar 2021 05:41:01 GMT</pubDate>
    <dc:creator>manjunathmeti</dc:creator>
    <dc:date>2021-03-26T05:41:01Z</dc:date>
    <item>
      <title>How to create a Table where each row is the result of a query and afterwards make some operations with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545512#M154531</link>
      <description>&lt;P&gt;Hello my unafraid nerve of steel fellas! I hope you are having a lot of fun this week...&lt;BR /&gt;&lt;BR /&gt;I have been loosing my sleep and sanity trying to create a table with some values that come from search queries and then add some fields (columms) to this table that will be teh result of some simple math operations, here is an example of what I am trying to achieve and in advace I thank you and praise you for your help I REALLY DO!&lt;BR /&gt;&lt;BR /&gt;[| search 1 | fields A | stats&amp;nbsp; count(A) as&amp;nbsp; Total 1]&lt;/P&gt;&lt;P&gt;[| search 2 | fields A | stats&amp;nbsp; count(B) as&amp;nbsp; Total 2]&lt;/P&gt;&lt;P&gt;[| search 3 | fields A | stats&amp;nbsp; count(C) as&amp;nbsp; Total 3]&lt;BR /&gt;&lt;BR /&gt;I will be obtaining the values Total 1, Total 3 and Total 3 then I want to build this table&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE width="343"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="79px" height="25px"&gt;Stage&amp;nbsp;&lt;/TD&gt;&lt;TD width="80px" height="25px"&gt;Net&lt;/TD&gt;&lt;TD width="183px" height="25px"&gt;Conversión&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="79px" height="25px"&gt;A&lt;/TD&gt;&lt;TD width="80px" height="25px"&gt;Total 1&lt;/TD&gt;&lt;TD width="183px" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="79px" height="47px"&gt;B&lt;/TD&gt;&lt;TD width="80px" height="47px"&gt;Total 2&lt;/TD&gt;&lt;TD width="183px" height="47px"&gt;&amp;nbsp;(Total 2 - Total 1) / Total 2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="79px" height="47px"&gt;C&lt;/TD&gt;&lt;TD width="80px" height="47px"&gt;Total 3&lt;/TD&gt;&lt;TD width="183px" height="47px"&gt;&amp;nbsp;(Total 3 - Total 1) / Total 3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I will be so thankful if anyone can help me build this !!! THANKS SO MUCH IN ADVANCE or if you can reference some documentation as well!!! thank you so much&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 01:40:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545512#M154531</guid>
      <dc:creator>andres91302</dc:creator>
      <dc:date>2021-03-26T01:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Table where each row is the result of a query and afterwards make some operations with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545516#M154533</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232004"&gt;@andres91302&lt;/a&gt;,&lt;BR /&gt;Try this. Here searches 2 and 3 are appended to search 1. Command eventstats is used to copy Total1 values to all the rows.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search 1 | fields A 
| stats  count(A) as Net 
| eval stage="A", Total1=Net
| append 
    [ search search 2 | fields B
    | stats count(B) as Net 
    | eval stage="B"] 
| append 
    [ search search 3 | fields C
    | stats count(C) as Net 
    | eval stage="C"] 
| eventstats max(Total1) as Total1 
| eval Conversión=(Net-Total1)/Total1 
| fields stage, Net, Conversión&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, a like would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 05:41:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545516#M154533</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-03-26T05:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Table where each row is the result of a query and afterwards make some operations with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545725#M154653</link>
      <description>&lt;P&gt;It did excaclty just what I wanted it! 10/10, thank you much I've noticed you been participatig in my questions lately and you are such a great help! Please allow me to ask you another question.... how can I modify my code to have this conversion rate calculated by month of each year... and then grahp a timeline with i.. in anoher words it would be only the Stage field and the conversion field with through time... kinda like this:&lt;BR /&gt;&lt;BR /&gt;Stage&amp;nbsp; Conversion&amp;nbsp; Time&lt;BR /&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Jan 2021&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Jan 2021&lt;/P&gt;&lt;P&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.12&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Jan 2021&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Feb 2021&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.16&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;Feb 2021&lt;/P&gt;&lt;P&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Feb 2021&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;THANK YOU SO MUCH AGEN LIKE THANK YOU SO SO MUCH&lt;/P&gt;</description>
      <pubDate>Sat, 27 Mar 2021 22:36:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545725#M154653</guid>
      <dc:creator>andres91302</dc:creator>
      <dc:date>2021-03-27T22:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Table where each row is the result of a query and afterwards make some operations with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545824#M154697</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232004"&gt;@andres91302&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;You can calculate the &lt;STRONG&gt;Time&lt;/STRONG&gt; field and count by Time. Try this,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search 1 
| fields A 
| eval Time=strftime(_time, "%B %Y") 
| stats count(A) as Net by Time 
| eval Stage="A", Total1=Net 
| append 
    [ search search 2 
    | fields B 
    | eval Time=strftime(_time, "%B %Y") 
    | stats count(B) as Net by Time 
    | eval Stage="B"] 
| append 
    [ search search 3 
    | fields C 
    | eval Time=strftime(_time, "%B %Y") 
    | stats count(C) as Net by Time 
    | eval Stage="C"] 
| eventstats max(Total1) as Total1 by Time 
| eval Conversion=(Net-Total1)/Total1 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add the below command to plot the graph, the x-axis will be Time and y-axis will be COnversion values:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| xyseries Time, Stage, Conversion&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 08:04:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545824#M154697</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-03-29T08:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Table where each row is the result of a query and afterwards make some operations with it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545862#M154715</link>
      <description>&lt;P&gt;THANK YOU SO SO SO SO SO SOS SO MUCH LIKE YOU HAVE NO FREAKING IDEA THANK YOU SO SO MUCH&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 14:40:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Table-where-each-row-is-the-result-of-a-query/m-p/545862#M154715</guid>
      <dc:creator>andres91302</dc:creator>
      <dc:date>2021-03-29T14:40:38Z</dc:date>
    </item>
  </channel>
</rss>

