<?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 Contingency table using dictated column fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Contingency-table-using-dictated-column-fields/m-p/484081#M135514</link>
    <description>&lt;P&gt;I am currently looking to make a table that shows how variables from 5 fields (the first five rows that splunk says have the biggest count) end up being spread into 5 new fields. As of now, I have maxcol and maxrow set to 5. I know the 5 new fields that I want to specifically look at. Is there any way to call these fields out when I am doing the search. My current search looks like this &lt;/P&gt;

&lt;P&gt;index=name |'data' | contingency group newgroup maxcols=5 maxrows=5 usetotal=false&lt;/P&gt;

&lt;P&gt;I was hoping there would be some way to replace the maxcols=5 with a variable like col1=fielda col2=fieldb etc.... &lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2019 21:52:46 GMT</pubDate>
    <dc:creator>totho</dc:creator>
    <dc:date>2019-11-15T21:52:46Z</dc:date>
    <item>
      <title>Contingency table using dictated column fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Contingency-table-using-dictated-column-fields/m-p/484081#M135514</link>
      <description>&lt;P&gt;I am currently looking to make a table that shows how variables from 5 fields (the first five rows that splunk says have the biggest count) end up being spread into 5 new fields. As of now, I have maxcol and maxrow set to 5. I know the 5 new fields that I want to specifically look at. Is there any way to call these fields out when I am doing the search. My current search looks like this &lt;/P&gt;

&lt;P&gt;index=name |'data' | contingency group newgroup maxcols=5 maxrows=5 usetotal=false&lt;/P&gt;

&lt;P&gt;I was hoping there would be some way to replace the maxcols=5 with a variable like col1=fielda col2=fieldb etc.... &lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 21:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Contingency-table-using-dictated-column-fields/m-p/484081#M135514</guid>
      <dc:creator>totho</dc:creator>
      <dc:date>2019-11-15T21:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Contingency table using dictated column fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Contingency-table-using-dictated-column-fields/m-p/484082#M135515</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;
Please provide a sample of the current results and the expected results.&lt;/P&gt;

&lt;P&gt;Maybe you can do it with &lt;CODE&gt;untable&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2019 06:47:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Contingency-table-using-dictated-column-fields/m-p/484082#M135515</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-11-16T06:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Contingency table using dictated column fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Contingency-table-using-dictated-column-fields/m-p/484083#M135516</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=name AND newgroup IN("value1", "value2", "value3", "value4", "value5")
| 'data'
| contingency group newgroup maxrows=5 usetotal=false
| table group value1 value2 value3 value4 value5
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is a run-anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_* AND sourcetype IN("splunkd", "splunk_resource_usage", "audittrail", "splunkd_access", "kvstore") AND date_minute IN("10", "20", "30", "40", "50")
| contingency sourcetype date_minute
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Nov 2019 22:40:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Contingency-table-using-dictated-column-fields/m-p/484083#M135516</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-17T22:40:49Z</dc:date>
    </item>
  </channel>
</rss>

