<?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 to format a table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-a-table/m-p/445641#M126407</link>
    <description>&lt;P&gt;I have a search that will produce a pretty basic table like this:  &lt;CODE&gt;index=myindex | chart count by host, partition&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host        partition1   partition2
serverA       453                0
serverB        23               23
serverC         0              231
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm trying to make a dashboard, and for my dashboard, the specific values are not really important.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host        partition1   partition2
serverA         X                
serverB         X               X
serverC                         X
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would be fine with something like this, or a graphical checkmark or something?  I'm just looking to show where the non-zero values are.  Anything additional I can do to bring attention to those through color-coding etc would be gravy.&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2019 20:34:00 GMT</pubDate>
    <dc:creator>ShagVT</dc:creator>
    <dc:date>2019-08-13T20:34:00Z</dc:date>
    <item>
      <title>How to format a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-a-table/m-p/445641#M126407</link>
      <description>&lt;P&gt;I have a search that will produce a pretty basic table like this:  &lt;CODE&gt;index=myindex | chart count by host, partition&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host        partition1   partition2
serverA       453                0
serverB        23               23
serverC         0              231
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm trying to make a dashboard, and for my dashboard, the specific values are not really important.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host        partition1   partition2
serverA         X                
serverB         X               X
serverC                         X
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would be fine with something like this, or a graphical checkmark or something?  I'm just looking to show where the non-zero values are.  Anything additional I can do to bring attention to those through color-coding etc would be gravy.&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 20:34:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-a-table/m-p/445641#M126407</guid>
      <dc:creator>ShagVT</dc:creator>
      <dc:date>2019-08-13T20:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to format a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-a-table/m-p/445642#M126408</link>
      <description>&lt;P&gt;Give this a try (will show 1 and blank based on count)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex | chart dc(host) by host, partition
| foreach * [| eval "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"=if("&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"!="host" AND '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'=0,"",'&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;')]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Aug 2019 20:52:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-a-table/m-p/445642#M126408</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-08-13T20:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to format a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-a-table/m-p/445643#M126409</link>
      <description>&lt;P&gt;Thanks - I &lt;STRONG&gt;never&lt;/STRONG&gt; think of the foreach function.&lt;/P&gt;

&lt;P&gt;I modified slightly to end up with X since that's a little easier to spot when the chart has more values:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| foreach * [|eval "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"=if("&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;" != "host" AND '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'=0, "", '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;')]
| foreach * [|eval "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"=if('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' = 1, "X", '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;')]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Aug 2019 21:37:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-a-table/m-p/445643#M126409</guid>
      <dc:creator>ShagVT</dc:creator>
      <dc:date>2019-08-13T21:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to format a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-a-table/m-p/445644#M126410</link>
      <description>&lt;P&gt;@ShagVT if your issue is resolved please accept the answer to mark this question as answered!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 02:22:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-a-table/m-p/445644#M126410</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-08-14T02:22:03Z</dc:date>
    </item>
  </channel>
</rss>

