<?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 How can i filter columns based on other column value in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/How-can-i-filter-columns-based-on-other-column-value/m-p/227739#M1980</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a created a table with columns A and B, we are using KV store to get the threshold config data and KV&lt;BR /&gt;
Store in response providing table column names as &lt;BR /&gt;
&lt;STRONG&gt;..&lt;/STRONG&gt;. &lt;BR /&gt;
KV Store is also having a column (component_id) value of which is same as column A in other table.&lt;/P&gt;

&lt;P&gt;I want to filter the KV Store's column &lt;STRONG&gt;..&lt;/STRONG&gt; based on the value of column B and column A.&lt;/P&gt;

&lt;P&gt;I tried using a macro with 2 parameters in first input passing the column A value and other parameter passing column B value.&lt;/P&gt;

&lt;P&gt;Here is my macro query:&lt;BR /&gt;
lookup KVStore_thresholds_config component_id | table component_id, Overtide.&lt;EM&gt;.thesholdValue | transpose 1000 | addtotals | fields - row&lt;/EM&gt; | &lt;BR /&gt;
where column = $y$ | table column, Total&lt;/P&gt;

&lt;P&gt;But its not working, macro is not searching the desired result, also it is overwriting previous table fields.&lt;/P&gt;

&lt;P&gt;Can someone help on the possible ways to get the required result from the KV store.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:15:40 GMT</pubDate>
    <dc:creator>jvishwak</dc:creator>
    <dc:date>2020-09-29T11:15:40Z</dc:date>
    <item>
      <title>How can i filter columns based on other column value</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-i-filter-columns-based-on-other-column-value/m-p/227739#M1980</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a created a table with columns A and B, we are using KV store to get the threshold config data and KV&lt;BR /&gt;
Store in response providing table column names as &lt;BR /&gt;
&lt;STRONG&gt;..&lt;/STRONG&gt;. &lt;BR /&gt;
KV Store is also having a column (component_id) value of which is same as column A in other table.&lt;/P&gt;

&lt;P&gt;I want to filter the KV Store's column &lt;STRONG&gt;..&lt;/STRONG&gt; based on the value of column B and column A.&lt;/P&gt;

&lt;P&gt;I tried using a macro with 2 parameters in first input passing the column A value and other parameter passing column B value.&lt;/P&gt;

&lt;P&gt;Here is my macro query:&lt;BR /&gt;
lookup KVStore_thresholds_config component_id | table component_id, Overtide.&lt;EM&gt;.thesholdValue | transpose 1000 | addtotals | fields - row&lt;/EM&gt; | &lt;BR /&gt;
where column = $y$ | table column, Total&lt;/P&gt;

&lt;P&gt;But its not working, macro is not searching the desired result, also it is overwriting previous table fields.&lt;/P&gt;

&lt;P&gt;Can someone help on the possible ways to get the required result from the KV store.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:15:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-i-filter-columns-based-on-other-column-value/m-p/227739#M1980</guid>
      <dc:creator>jvishwak</dc:creator>
      <dc:date>2020-09-29T11:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can i filter columns based on other column value</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-i-filter-columns-based-on-other-column-value/m-p/227740#M1981</link>
      <description>&lt;P&gt;So heres a simpler example of filtering by lookup value which should hopefully get you started.&lt;/P&gt;

&lt;P&gt;Using data ( put into index 456446 ) -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;time,column_a,column_b
09-21-2016 01:00:00,11,10
09-22-2016 01:00:00,9,10
09-23-2016 01:00:00,7,10
09-24-2016 01:00:00,5,10
09-25-2016 01:00:00,3,10
09-26-2016 01:00:00,1,10
09-27-2016 01:00:00,0,10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With lookup ( put into 456446_lookup ) -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;component_id, value
1,1
2,2
3,3
4,5
5,8
6,13
7,21
8,34
9,55
10,89
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can use this -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="456446" 
| lookup 456446_lookup component_id as column_a outputnew value as comparison_field
| table column_a, column_b, comparison_field
| where column_b &amp;lt; comparison_field
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Oct 2016 08:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-i-filter-columns-based-on-other-column-value/m-p/227740#M1981</guid>
      <dc:creator>msivill_splunk</dc:creator>
      <dc:date>2016-10-03T08:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can i filter columns based on other column value</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-i-filter-columns-based-on-other-column-value/m-p/227741#M1982</link>
      <description>&lt;P&gt;updating he question as few text got removed while pasting...&lt;BR /&gt;
KV Store in response providing table column names as &lt;BR /&gt;
..&lt;/P&gt;

&lt;P&gt;Macro Query which i tried:&lt;BR /&gt;
lookup KVStore_thresholds_config component_id | table component_id, Override.&lt;EM&gt;.thesholdValue | transpose 1000 | addtotals | fields - row&lt;/EM&gt;| where column = $y$ | table column, Total&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:15:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-i-filter-columns-based-on-other-column-value/m-p/227741#M1982</guid>
      <dc:creator>jvishwak</dc:creator>
      <dc:date>2020-09-29T11:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can i filter columns based on other column value</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-i-filter-columns-based-on-other-column-value/m-p/227742#M1983</link>
      <description>&lt;P&gt;Somehow the text is getting removed  :(, in simple format again&lt;/P&gt;

&lt;P&gt;KV Store in response providing table column names as &lt;BR /&gt;
someFixedtext.ValueAsWeHaveInColumnB.SomeFixedText&lt;/P&gt;

&lt;P&gt;Macro Query which i tried:&lt;BR /&gt;
lookup KVStore_thresholds_config component_id | table component_id, Override..thesholdValue | transpose 1000 | addtotals | fields - row| where column = $y$ | table column, Total&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:15:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-i-filter-columns-based-on-other-column-value/m-p/227742#M1983</guid>
      <dc:creator>jvishwak</dc:creator>
      <dc:date>2020-09-29T11:15:48Z</dc:date>
    </item>
  </channel>
</rss>

