<?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 Why is fieldformat not working if I don't include a certain value in the table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-fieldformat-not-working-if-I-don-t-include-a-certain/m-p/285176#M86257</link>
    <description>&lt;P&gt;here is my search, I'm trying to create a report that shows the &lt;STRONG&gt;error count&lt;/STRONG&gt;, &lt;STRONG&gt;error percentage&lt;/STRONG&gt;, and &lt;STRONG&gt;total transaction count&lt;/STRONG&gt;...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dedup TransactionID | stats count As ErrorCount by TransactionName  | appendcols [search Message="Calling ProcessRequest" | stats count as TotalTransactionCount by TransactionName ]|eval ErrorPerc= if (isnull(ErrorCount), 0, ErrorCount/TotalTransactionCount) | fieldformat ErrorPercentage = tostring(round(ErrorPerc,6)*100)."%" | Table TransactionName  ErrorPercentage ErrorCount ErrorPerc TotalTransactionCount | fillnull value=0 | sort -ErrorCount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I don't include &lt;STRONG&gt;ErrorPerc&lt;/STRONG&gt; in the table, &lt;STRONG&gt;ErrorPercentage&lt;/STRONG&gt; shows up as null.  I really don't want &lt;STRONG&gt;ErrorPerc&lt;/STRONG&gt; in there since it's less readable and a duplicate of &lt;STRONG&gt;ErrorPercentage&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Dan&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2016 14:50:10 GMT</pubDate>
    <dc:creator>danoconnl</dc:creator>
    <dc:date>2016-09-15T14:50:10Z</dc:date>
    <item>
      <title>Why is fieldformat not working if I don't include a certain value in the table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-fieldformat-not-working-if-I-don-t-include-a-certain/m-p/285176#M86257</link>
      <description>&lt;P&gt;here is my search, I'm trying to create a report that shows the &lt;STRONG&gt;error count&lt;/STRONG&gt;, &lt;STRONG&gt;error percentage&lt;/STRONG&gt;, and &lt;STRONG&gt;total transaction count&lt;/STRONG&gt;...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dedup TransactionID | stats count As ErrorCount by TransactionName  | appendcols [search Message="Calling ProcessRequest" | stats count as TotalTransactionCount by TransactionName ]|eval ErrorPerc= if (isnull(ErrorCount), 0, ErrorCount/TotalTransactionCount) | fieldformat ErrorPercentage = tostring(round(ErrorPerc,6)*100)."%" | Table TransactionName  ErrorPercentage ErrorCount ErrorPerc TotalTransactionCount | fillnull value=0 | sort -ErrorCount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I don't include &lt;STRONG&gt;ErrorPerc&lt;/STRONG&gt; in the table, &lt;STRONG&gt;ErrorPercentage&lt;/STRONG&gt; shows up as null.  I really don't want &lt;STRONG&gt;ErrorPerc&lt;/STRONG&gt; in there since it's less readable and a duplicate of &lt;STRONG&gt;ErrorPercentage&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 14:50:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-fieldformat-not-working-if-I-don-t-include-a-certain/m-p/285176#M86257</guid>
      <dc:creator>danoconnl</dc:creator>
      <dc:date>2016-09-15T14:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why is fieldformat not working if I don't include a certain value in the table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-fieldformat-not-working-if-I-don-t-include-a-certain/m-p/285177#M86258</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dedup TransactionID | stats count As ErrorCount by TransactionName | appendcols [search Message="Calling ProcessRequest" | stats count as TotalTransactionCount by TransactionName ]|eval ErrorPercentage = if (isnull(ErrorCount), 0, ErrorCount/TotalTransactionCount) | fieldformat ErrorPercentage=tostring(round(ErrorPercentage,6)*100)."%" | Table TransactionName ErrorPercentage ErrorCount TotalTransactionCount | fillnull value=0 | sort -ErrorCount
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Sep 2016 16:26:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-fieldformat-not-working-if-I-don-t-include-a-certain/m-p/285177#M86258</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-15T16:26:30Z</dc:date>
    </item>
  </channel>
</rss>

