<?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: Can you help me figure out why one of my table columns contains no values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378458#M110933</link>
    <description>&lt;P&gt;Here the field is only sports_category  ,department,sum(TOTAL_BUDGET)  .&lt;/P&gt;

&lt;P&gt;index=monthly_budget&lt;BR /&gt;
 | chart sum(TOTAL_BUDGET) over sports_category  by department limit=0&lt;/P&gt;

&lt;P&gt;For example, how about doing this?&lt;BR /&gt;
 | stats sum(TOTAL_BUDGET)  by department,sports_category, Coach&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:54:27 GMT</pubDate>
    <dc:creator>HiroshiSatoh</dc:creator>
    <dc:date>2020-09-29T21:54:27Z</dc:date>
    <item>
      <title>Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378456#M110931</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=monthly_budget
| chart sum(TOTAL_BUDGET) over sports_category  by department limit=0
| transpose 0 header_field=sports_category
| addtotals fieldname=TOTAL
| rename column as "Department"
| fillnull value="-"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My example code looks like that. The table would probably look like this:&lt;/P&gt;

&lt;P&gt;Department     | BASKETBALL |      GOLF  |    SWIMMING |     TOTAL &lt;BR /&gt;
High School      | 123,123,456 | 123,123 | 123,123,432 | total of this&lt;BR /&gt;
Elementary&lt;BR /&gt;
College&lt;BR /&gt;
Masters&lt;/P&gt;

&lt;P&gt;What I want is to add another column for "Coach" for each department (I've already set up the automatic lookup for this). So the columns would be: &lt;/P&gt;

&lt;P&gt;Department, Basketball, Golf, Swimming, TOTAL, Coach.&lt;/P&gt;

&lt;P&gt;I tried:&lt;BR /&gt;
-| fields + Coach&lt;BR /&gt;
-| table Department, Basketball, Golf, Swimming, TOTAL, Coach    // this works but the Coach column has no value.&lt;/P&gt;

&lt;P&gt;Please help.&lt;/P&gt;

&lt;P&gt;EDIT: The original search is fine. The coach is already in the fields list, I just want to call it as another column. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 03:30:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378456#M110931</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-07T03:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378457#M110932</link>
      <description>&lt;P&gt;@rajyah ,&lt;/P&gt;

&lt;P&gt;If you have a lookup already for Coach per department, assuming it as entries as &lt;/P&gt;

&lt;P&gt;Department,Coach&lt;BR /&gt;
High School ,CoachA&lt;BR /&gt;
Elementary,CoachB&lt;/P&gt;

&lt;P&gt;Try,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      index=monthly_budget
     | chart sum(TOTAL_BUDGET) over sports_category  by department limit=0
     | transpose 0 header_field=sports_category
     | addtotals fieldname=TOTAL
     | rename column as "Department"
     | fillnull value="-"
     | lookup "coach_lookup_name here" Department OUTPUT Coach
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Nov 2018 03:47:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378457#M110932</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-11-07T03:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378458#M110933</link>
      <description>&lt;P&gt;Here the field is only sports_category  ,department,sum(TOTAL_BUDGET)  .&lt;/P&gt;

&lt;P&gt;index=monthly_budget&lt;BR /&gt;
 | chart sum(TOTAL_BUDGET) over sports_category  by department limit=0&lt;/P&gt;

&lt;P&gt;For example, how about doing this?&lt;BR /&gt;
 | stats sum(TOTAL_BUDGET)  by department,sports_category, Coach&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:54:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378458#M110933</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2020-09-29T21:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378459#M110934</link>
      <description>&lt;P&gt;I've already setup the automatic lookup for it sir. I just need to call the "Coach" field created from the lookup but I can't...&lt;/P&gt;

&lt;P&gt;Thank you for your response sir.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 05:07:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378459#M110934</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-07T05:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378460#M110935</link>
      <description>&lt;P&gt;Tried stats command sir but I didn't get the result I'm looking for. Chart command is the closest hint for me.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 05:15:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378460#M110935</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-07T05:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378461#M110936</link>
      <description>&lt;P&gt;Is Coach's field in monthly_budget?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 05:22:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378461#M110936</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-11-07T05:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378462#M110937</link>
      <description>&lt;P&gt;Coach and the Department fields are created by the automatic lookup. And when I check the fields after running my original search, I can see the field in the fields list. The original search is okay but the thing is I can't call the Coach field.&lt;/P&gt;

&lt;P&gt;By the way, the department and the coach field are in the lookup table but I've already set it up using automatic lookup.&lt;/P&gt;

&lt;P&gt;Thank you for your response sir.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 05:42:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378462#M110937</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-07T05:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378463#M110938</link>
      <description>&lt;P&gt;Tried your response sir but I can't.. The field "Coach" which was created by automatic lookup is sitting idly in the fields list..&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 05:51:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378463#M110938</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-07T05:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378464#M110939</link>
      <description>&lt;P&gt;@rajyah , okie, thats  because you dont have the fields in your chart and getting filtered out.&lt;BR /&gt;
So either do the manual lookup after the chart command or include the coach field in the chart command, probably values(Coach) as Coach&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 05:53:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378464#M110939</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-11-07T05:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378465#M110940</link>
      <description>&lt;P&gt;solved it by appendcols! Thank you for your response. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 06:04:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378465#M110940</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-07T06:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378466#M110941</link>
      <description>&lt;P&gt;hi @rajyah&lt;/P&gt;

&lt;P&gt;I'm glad you found a solution to your problem. Would you add more detail as to how you came to fix your table? Other users would love to hear your detailed explanation! Also, can you please approve this answer so others know where to look for the correct solution? &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 21:52:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378466#M110941</guid>
      <dc:creator>mstjohn_splunk</dc:creator>
      <dc:date>2018-11-07T21:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me figure out why one of my table columns contains no values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378467#M110942</link>
      <description>&lt;P&gt;I used:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   index=monthly_budget
     | chart sum(TOTAL_BUDGET) over sports_category  by department limit=0
     | transpose 0 header_field=sports_category
     | addtotals fieldname=TOTAL
     | rename column as "Department"
     | appendcols [ search index=monthly_budget
     | stats values(Coach) as "Coach"  by department
     | fields - department]
     | fillnull value="-"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I know this isn't the best way to do this but it works for me. hehe It'll be really cool if there's another good way to do this. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Nov 2018 01:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-figure-out-why-one-of-my-table-columns-contains/m-p/378467#M110942</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-08T01:40:32Z</dc:date>
    </item>
  </channel>
</rss>

