<?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 group by forcing line value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478348#M134170</link>
    <description>&lt;P&gt;Thanks your solution works. I add this :&lt;/P&gt;

&lt;P&gt;|append [| makeresults | eval F1 ="a b c" | makemv F1] | stats count(host) as Nb BY F1&lt;/P&gt;</description>
    <pubDate>Tue, 05 Nov 2019 08:16:06 GMT</pubDate>
    <dc:creator>matimat</dc:creator>
    <dc:date>2019-11-05T08:16:06Z</dc:date>
    <item>
      <title>How to group by forcing line value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478344#M134166</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to show how many lines contains some value even if no line return.&lt;/P&gt;

&lt;P&gt;My data : &lt;/P&gt;

&lt;P&gt;Row 1 :&lt;BR /&gt;
     &lt;STRONG&gt;F1: a&lt;/STRONG&gt;&lt;BR /&gt;
Row 2 :&lt;BR /&gt;
     &lt;STRONG&gt;F1: b&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Result desired on table : &lt;BR /&gt;
&lt;STRONG&gt;F1 =&amp;gt; Nb&lt;BR /&gt;
a =&amp;gt; 1&lt;BR /&gt;
b =&amp;gt; 1&lt;BR /&gt;
c =&amp;gt; 0&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 20:02:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478344#M134166</guid>
      <dc:creator>matimat</dc:creator>
      <dc:date>2019-11-04T20:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by forcing line value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478345#M134167</link>
      <description>&lt;P&gt;Do you have a master list of all possible values for F1? If yes, is it in a lookup file?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 21:02:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478345#M134167</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-11-04T21:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by forcing line value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478346#M134168</link>
      <description>&lt;P&gt;@woodcock answered a very similar question a while back. Check out &lt;A href="https://answers.splunk.com/answers/566928/how-to-find-missing-values-from-a-search-events-co-1.html"&gt;https://answers.splunk.com/answers/566928/how-to-find-missing-values-from-a-search-events-co-1.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 00:22:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478346#M134168</guid>
      <dc:creator>nplamondon</dc:creator>
      <dc:date>2019-11-05T00:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by forcing line value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478347#M134169</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults
| eval host="All real events will have a 'host' value"
| eval F1="a b"
| makemv F1
| mvexpand F1

| rename COMMENT AS "Everything above generates sample events; everything below is your solution"

| append [|makeresults
| rename COMMENT AS "This would better be done using a 'lookup' file with ' |inputlookup append=t' instead of '|makeresults ...'"
| eval F1="a b c d e f list all possible values here"
| makemv F1 ]
| stats count(host) AS Nb BY F1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Nov 2019 02:12:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478347#M134169</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-05T02:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by forcing line value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478348#M134170</link>
      <description>&lt;P&gt;Thanks your solution works. I add this :&lt;/P&gt;

&lt;P&gt;|append [| makeresults | eval F1 ="a b c" | makemv F1] | stats count(host) as Nb BY F1&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 08:16:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-by-forcing-line-value/m-p/478348#M134170</guid>
      <dc:creator>matimat</dc:creator>
      <dc:date>2019-11-05T08:16:06Z</dc:date>
    </item>
  </channel>
</rss>

