<?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: Use two stats function with different group by in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564083#M196486</link>
    <description>&lt;P&gt;Then my solution seams to solve your problem. Have you tried to let it run like my suggestion was? Put the whole text (both blocks) into your search bar.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Aug 2021 11:54:38 GMT</pubDate>
    <dc:creator>skramp</dc:creator>
    <dc:date>2021-08-20T11:54:38Z</dc:date>
    <item>
      <title>Use two stats function with different group by</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564040#M196476</link>
      <description>&lt;P&gt;&lt;BR /&gt;how to get this two stats result in one query&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(earliest=-24h@h index="s_data_sum" (type="c" OR type="s") (sourcetype="ys:ho_sum" OR (sourcetype="ys:vo_cv")))&lt;/P&gt;&lt;P&gt;| stats latest(first) as first&lt;BR /&gt;latest(last) as last&lt;BR /&gt;latest(index) as index&lt;BR /&gt;by dev_id dq (this dq field is not present in ho_sum)&lt;BR /&gt;&lt;BR /&gt;| stats latest(first) as first_vu&lt;BR /&gt;latest(last) as last_vu&lt;BR /&gt;latest(index) as index_1&lt;BR /&gt;by dev_id sourcetype&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 07:37:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564040#M196476</guid>
      <dc:creator>rj</dc:creator>
      <dc:date>2021-08-20T07:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Use two stats function with different group by</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564043#M196477</link>
      <description>&lt;P&gt;(earliest=-24h@h index="s_data_sum" (type="c" OR type="s") (sourcetype="ys:ho_sum" OR (sourcetype="ys:vo_cv")))&lt;BR /&gt;| stats latest(first) as first&lt;BR /&gt;latest(last) as last&lt;BR /&gt;latest(index) as index&lt;BR /&gt;by dev_id dq (this dq field is not present in ho_sum)&lt;BR /&gt;&lt;BR /&gt;| append [search&amp;nbsp;(earliest=-24h@h index="s_data_sum" (type="c" OR type="s") (sourcetype="ys:ho_sum" OR (sourcetype="ys:vo_cv")))&amp;nbsp;&lt;BR /&gt;| stats latest(first) as first_vu&lt;BR /&gt;latest(last) as last_vu&lt;BR /&gt;latest(index) as index_1&lt;BR /&gt;by dev_id sourcetype]&lt;BR /&gt;&lt;BR /&gt;Here you have one query but two searches but one result set. Using it this way isn't that nice because as mentioned you have two separate searches.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 07:49:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564043#M196477</guid>
      <dc:creator>skramp</dc:creator>
      <dc:date>2021-08-20T07:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Use two stats function with different group by</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564075#M196484</link>
      <description>&lt;P&gt;yes ,i have two different searches ,but i need to use&amp;nbsp; output of one filed and to use in another&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 10:26:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564075#M196484</guid>
      <dc:creator>rj</dc:creator>
      <dc:date>2021-08-20T10:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Use two stats function with different group by</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564083#M196486</link>
      <description>&lt;P&gt;Then my solution seams to solve your problem. Have you tried to let it run like my suggestion was? Put the whole text (both blocks) into your search bar.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 11:54:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564083#M196486</guid>
      <dc:creator>skramp</dc:creator>
      <dc:date>2021-08-20T11:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Use two stats function with different group by</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564258#M196558</link>
      <description>&lt;P&gt;thankyou for the reply ,is there is any other way of doing it&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 05:34:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564258#M196558</guid>
      <dc:creator>rj</dc:creator>
      <dc:date>2021-08-23T05:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Use two stats function with different group by</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564267#M196559</link>
      <description>&lt;P&gt;You can try this, but I don't know if that is the solution you need:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(earliest=-24h@h index="s_data_sum" (type="c" OR type="s") (sourcetype="ys:ho_sum" OR (sourcetype="ys:vo_cv")))&lt;BR /&gt;&lt;/SPAN&gt;| fillnull&amp;nbsp;&lt;SPAN&gt;dq &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| stats latest(first) as first&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;latest(last) as last&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;latest(index) as index&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;by dev_id dq sourcetype&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 07:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-two-stats-function-with-different-group-by/m-p/564267#M196559</guid>
      <dc:creator>skramp</dc:creator>
      <dc:date>2021-08-23T07:30:34Z</dc:date>
    </item>
  </channel>
</rss>

