<?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 with a static column A and dynamic column B based on search values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-a-static-column-A-and-dynamic-column/m-p/183526#M52845</link>
    <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search producing columnA and ColumnB | append [| gentimes start=-1 | eval columnA="LoginFailure,LoginSuccess,Account Lockout" | table columnA | makemv delim="," columnA | mvexpand columnA] | stats values(columnB) as columnB by columnA | fillnull value="NO" columnB
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 15 Jan 2015 23:06:55 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2015-01-15T23:06:55Z</dc:date>
    <item>
      <title>How to create a table with a static column A and dynamic column B based on search values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-a-static-column-A-and-dynamic-column/m-p/183525#M52844</link>
      <description>&lt;P&gt;I want to create a table as:&lt;/P&gt;

&lt;P&gt;Column A, Column B&lt;BR /&gt;
LoginFailure, YES&lt;BR /&gt;
LoginSuccess, NO&lt;BR /&gt;
Account Lockout, YES&lt;/P&gt;

&lt;P&gt;Basically YES/NO values are determined depending on if that event occurred.&lt;/P&gt;

&lt;P&gt;My challenge is if LoginSuccess event never occurred, it does not get displayed in my report. So I need a report with static number of rows (which will be predefined list of events I want to monitor) and values as Yes/No depending if that event occurred for a given timeframe. &lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 11:50:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-a-static-column-A-and-dynamic-column/m-p/183525#M52844</guid>
      <dc:creator>priyenshah6</dc:creator>
      <dc:date>2015-01-14T11:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table with a static column A and dynamic column B based on search values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-a-static-column-A-and-dynamic-column/m-p/183526#M52845</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search producing columnA and ColumnB | append [| gentimes start=-1 | eval columnA="LoginFailure,LoginSuccess,Account Lockout" | table columnA | makemv delim="," columnA | mvexpand columnA] | stats values(columnB) as columnB by columnA | fillnull value="NO" columnB
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Jan 2015 23:06:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-a-static-column-A-and-dynamic-column/m-p/183526#M52845</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-01-15T23:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table with a static column A and dynamic column B based on search values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-a-static-column-A-and-dynamic-column/m-p/183527#M52846</link>
      <description>&lt;P&gt;Hi @priyenshah6&lt;/P&gt;

&lt;P&gt;Just following up with this question, but did @somesoni2's answer below help solve your question?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 01:58:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-a-static-column-A-and-dynamic-column/m-p/183527#M52846</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-01-21T01:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table with a static column A and dynamic column B based on search values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-a-static-column-A-and-dynamic-column/m-p/183528#M52847</link>
      <description>&lt;P&gt;Thanks @somesoni2 for your response. I used Lookup approach to resolve the issue. Figured it was easy to manage Lookup file. Here is how I did it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookups Events.csv | eval count=0 | append [search xyz [inputlookup Events.csv] | stats count by name] | stats sum(count) as total by name | eval status=if(total&amp;gt;0,"Yes","No")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;here my Lookup file has list of all event names that I want to monitor and need status as Yes/No depending if they occurred in given time frame. &lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 05:05:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-a-static-column-A-and-dynamic-column/m-p/183528#M52847</guid>
      <dc:creator>priyenshah6</dc:creator>
      <dc:date>2015-01-21T05:05:12Z</dc:date>
    </item>
  </channel>
</rss>

