<?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 Simple query to take results and list them as yes/no in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Simple-query-to-take-results-and-list-them-as-yes-no/m-p/535427#M151320</link>
    <description>&lt;P&gt;Hello.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large data set that I'm working through that gives either a 5 digit number or a "-" if there is no value. I have my search results but I can't seem to get them into the format I'm looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to get the results into a format showing&lt;/P&gt;&lt;P&gt;Room 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set (total)&lt;/P&gt;&lt;P&gt;Unset (total)&lt;/P&gt;&lt;P&gt;And the same for Room 2, 3, 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query&lt;/P&gt;&lt;P&gt;Index=acme dvc_room="*" station="*"&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=acme dvc_room=4 station="-"&lt;/P&gt;&lt;P&gt;index=acme dvc_room=3&amp;nbsp;station="123456"&lt;/P&gt;&lt;P&gt;index=bluecoat dvc_room=2&amp;nbsp;station="-"&lt;/P&gt;&lt;P&gt;index=bluecoat dvc_room=1&amp;nbsp;station="56132"&lt;/P&gt;&lt;P&gt;index=bluecoat dvc_room=3&amp;nbsp;station="-"&lt;/P&gt;&lt;P&gt;index=bluecoat dvc_room=2&amp;nbsp;station="56132"&lt;/P&gt;&lt;P&gt;index=bluecoat dvc_room=4 station="56132"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jan 2021 06:08:05 GMT</pubDate>
    <dc:creator>mflippin</dc:creator>
    <dc:date>2021-01-12T06:08:05Z</dc:date>
    <item>
      <title>Simple query to take results and list them as yes/no</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-query-to-take-results-and-list-them-as-yes-no/m-p/535427#M151320</link>
      <description>&lt;P&gt;Hello.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large data set that I'm working through that gives either a 5 digit number or a "-" if there is no value. I have my search results but I can't seem to get them into the format I'm looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to get the results into a format showing&lt;/P&gt;&lt;P&gt;Room 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set (total)&lt;/P&gt;&lt;P&gt;Unset (total)&lt;/P&gt;&lt;P&gt;And the same for Room 2, 3, 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query&lt;/P&gt;&lt;P&gt;Index=acme dvc_room="*" station="*"&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=acme dvc_room=4 station="-"&lt;/P&gt;&lt;P&gt;index=acme dvc_room=3&amp;nbsp;station="123456"&lt;/P&gt;&lt;P&gt;index=bluecoat dvc_room=2&amp;nbsp;station="-"&lt;/P&gt;&lt;P&gt;index=bluecoat dvc_room=1&amp;nbsp;station="56132"&lt;/P&gt;&lt;P&gt;index=bluecoat dvc_room=3&amp;nbsp;station="-"&lt;/P&gt;&lt;P&gt;index=bluecoat dvc_room=2&amp;nbsp;station="56132"&lt;/P&gt;&lt;P&gt;index=bluecoat dvc_room=4 station="56132"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 06:08:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-query-to-take-results-and-list-them-as-yes-no/m-p/535427#M151320</guid>
      <dc:creator>mflippin</dc:creator>
      <dc:date>2021-01-12T06:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Simple query to take results and list them as yes/no</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-query-to-take-results-and-list-them-as-yes-no/m-p/535429#M151322</link>
      <description>&lt;P&gt;You say your query is&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Index=acme dvc_room="*" station="*" &lt;/LI-CODE&gt;&lt;P&gt;but you list output with index=bluecoat&lt;/P&gt;&lt;P&gt;Maybe this is what you are after&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your search...
| stats sum(eval(if(station="-",0,1))) as Set sum(eval(if(station="-",1,0))) as Unset by dvc_room&lt;/LI-CODE&gt;&lt;P&gt;Assuming that when you talk about set/unset, you mean that unset is station="-" and set if not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 06:21:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-query-to-take-results-and-list-them-as-yes-no/m-p/535429#M151322</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-01-12T06:21:51Z</dc:date>
    </item>
  </channel>
</rss>

