<?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 add just field name in the main result which have no result ,value just want to display the name . in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462401#M130359</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;from a logical data flow point of view: First you need to get a list of all clients, those that have updates and/or users and those that don't. Either you query an index for "client creation events", select the data from another system/database or you use a lookup table/csv. Whatever you choose, you will get a one-column table with all clients like "PPN,CNB,XXD,TYZ...INB...etc.".  Try this query to generate some data that show what the result would look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval Clients="PPN,INB,CNB,XXA,etc" | table Clients | makemv delim="," Clients | mvexpand Clients 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you join the list with the stats results of the clients and finally, you fill the null values. The result should look something like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Client Table generating search&amp;gt; | join type=left Clients [ search &amp;lt;your search generating the user/project events&amp;gt; | stats sum(users) as users, latest(project_id) as project_id by Clients] |fillnull value="N/A"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Use this example to generate some sample data for the join search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=10 | eval users=random()%100 | eval Clients=if(users&amp;gt;50,"PPN","CNB") | eval project_id="Project v".users | stats sum(users) as users, latest(project_id) as project_id by Clients
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The full query looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval Clients="PPN,INB,CNB,XXA,etc" | table Clients | makemv delim="," Clients | mvexpand Clients | join type=left[| makeresults count=10 | eval users=random()%100 | eval Clients=if(users&amp;gt;50,"PPN","CNB") | eval project_id="Project v".users | stats sum(users) as users, latest(project_id) as project_id by Clients] | fillnull value="N/A"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Best&lt;BR /&gt;
Oliver&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2019 10:11:12 GMT</pubDate>
    <dc:creator>ololdach</dc:creator>
    <dc:date>2019-12-16T10:11:12Z</dc:date>
    <item>
      <title>how to add just field name in the main result which have no result ,value just want to display the name .</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462399#M130357</link>
      <description>&lt;P&gt;Hello all &lt;/P&gt;

&lt;P&gt;I want to display the field name(CNB) in the main result which has no result now but in future it ll.&lt;/P&gt;

&lt;P&gt;I just want to showcase the total number of clients new and old. &lt;/P&gt;

&lt;P&gt;CNB - new clients no data &lt;BR /&gt;
PPN-old we have data &lt;BR /&gt;
INB - old we have data &lt;/P&gt;

&lt;P&gt;Want to display in table format &lt;/P&gt;

&lt;P&gt;clients  | recent time project update | number of users | by country&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Dec 2019 19:29:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462399#M130357</guid>
      <dc:creator>hrs2019</dc:creator>
      <dc:date>2019-12-15T19:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to add just field name in the main result which have no result ,value just want to display the name .</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462400#M130358</link>
      <description>&lt;P&gt;sample log please&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 09:43:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462400#M130358</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-16T09:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to add just field name in the main result which have no result ,value just want to display the name .</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462401#M130359</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;from a logical data flow point of view: First you need to get a list of all clients, those that have updates and/or users and those that don't. Either you query an index for "client creation events", select the data from another system/database or you use a lookup table/csv. Whatever you choose, you will get a one-column table with all clients like "PPN,CNB,XXD,TYZ...INB...etc.".  Try this query to generate some data that show what the result would look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval Clients="PPN,INB,CNB,XXA,etc" | table Clients | makemv delim="," Clients | mvexpand Clients 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you join the list with the stats results of the clients and finally, you fill the null values. The result should look something like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Client Table generating search&amp;gt; | join type=left Clients [ search &amp;lt;your search generating the user/project events&amp;gt; | stats sum(users) as users, latest(project_id) as project_id by Clients] |fillnull value="N/A"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Use this example to generate some sample data for the join search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=10 | eval users=random()%100 | eval Clients=if(users&amp;gt;50,"PPN","CNB") | eval project_id="Project v".users | stats sum(users) as users, latest(project_id) as project_id by Clients
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The full query looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval Clients="PPN,INB,CNB,XXA,etc" | table Clients | makemv delim="," Clients | mvexpand Clients | join type=left[| makeresults count=10 | eval users=random()%100 | eval Clients=if(users&amp;gt;50,"PPN","CNB") | eval project_id="Project v".users | stats sum(users) as users, latest(project_id) as project_id by Clients] | fillnull value="N/A"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Best&lt;BR /&gt;
Oliver&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 10:11:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462401#M130359</guid>
      <dc:creator>ololdach</dc:creator>
      <dc:date>2019-12-16T10:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to add just field name in the main result which have no result ,value just want to display the name .</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462402#M130360</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8069i98B01C65ABA91635/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I want to display in the below format CNB dont have any value  this is new client but PPN INB have.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 14:36:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462402#M130360</guid>
      <dc:creator>hrs2019</dc:creator>
      <dc:date>2019-12-16T14:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to add just field name in the main result which have no result ,value just want to display the name .</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462403#M130361</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults count=100
| eval count=random() % 3
| eval clients=case(count=1,"PPN",count=2,"INB",true(),NULL)
| stats values(_time) as Project_Update count as Number_of_Users by clients
| eval Project_Update=strftime(Project_Update,"%F")
| append 
    [| makeresults 
    | eval clients=split("CNB#PPN#INB","#")
    | mvexpand clients
    | eval Project_Update="N/A",Number_of_Users="N/A"
    | fields - _time]
| stats first(Project_Update) as Project_Update first(Number_of_Users) as Number_of_Users  by clients
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For the time being, it looks like this.&lt;/P&gt;

&lt;P&gt;so,&lt;/P&gt;

&lt;P&gt;Create  user.csv:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Clients
PPN
CNB
INB
.....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
|table Clients "Project Update" "Number of Users" "by Country"
|inputlookup append=t user.csv
|fillnull value="N/A"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is easy.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 17:20:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462403#M130361</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-16T17:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to add just field name in the main result which have no result ,value just want to display the name .</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462404#M130362</link>
      <description>&lt;P&gt;@ololdach can you pls help me &lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 17:20:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462404#M130362</guid>
      <dc:creator>hrs2019</dc:creator>
      <dc:date>2019-12-16T17:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to add just field name in the main result which have no result ,value just want to display the name .</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462405#M130363</link>
      <description>&lt;P&gt;I've amended the answer below. Please always include sample data and an example of the output as it really helps to guess what you are up to &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 18:00:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462405#M130363</guid>
      <dc:creator>ololdach</dc:creator>
      <dc:date>2019-12-16T18:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to add just field name in the main result which have no result ,value just want to display the name .</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462406#M130364</link>
      <description>&lt;P&gt;Thanks For your help @to4kawa &lt;BR /&gt;
small info how i can add drildown option for &lt;BR /&gt;
Clients&lt;BR /&gt;
 PPN-- opne in new page (with there details )&lt;BR /&gt;
 CNB -- opne in new page (with there details )&lt;BR /&gt;
 INB-- opne in new page (with there details )&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 13:39:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462406#M130364</guid>
      <dc:creator>hrs2019</dc:creator>
      <dc:date>2019-12-18T13:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to add just field name in the main result which have no result ,value just want to display the name .</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462407#M130365</link>
      <description>&lt;P&gt;I don't know.&lt;BR /&gt;
you didn't provide your search details.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 14:03:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-add-just-field-name-in-the-main-result-which-have-no/m-p/462407#M130365</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-18T14:03:50Z</dc:date>
    </item>
  </channel>
</rss>

