<?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 Re: Format with commas an |appendpipe [stats sum(*) as * by Number ... in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680480#M232582</link>
    <description>&lt;P&gt;That's the job for &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConversionFunctions#tostring.28.26lt.3Bvalue.26gt.3B.2C.26lt.3Bformat.26gt.3B.29" target="_blank" rel="noopener"&gt;tostring&lt;/A&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| appendpipe
    [stats sum(*) as * by Number
    | foreach *
        [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = tostring(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, "commas")]
    | eval UserName="Total By Number: "]&lt;/LI-CODE&gt;&lt;P&gt;I'm not sure why you group by "Number" but evals "UserName".&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2024 04:14:18 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2024-03-13T04:14:18Z</dc:date>
    <item>
      <title>Format with commas an |appendpipe [stats sum(*) as * by Number ...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680413#M232557</link>
      <description>&lt;P&gt;&lt;EM&gt;Good afternoon everyone, I need your help in this way. I have a stats sum with the wild card *&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;|appendpipe [stats sum(*) as * by Number | eval UserName="Total By Number: "]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;and I need to format with commas the sum(*) as *. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;How I can do that? &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Thank you&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 16:18:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680413#M232557</guid>
      <dc:creator>BeautyData</dc:creator>
      <dc:date>2024-03-12T16:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Format with commas an |appendpipe [stats sum(*) as * by Number ...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680416#M232558</link>
      <description>&lt;P&gt;It is not clear to me what your expected output would look like. Please can you share an example?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 16:44:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680416#M232558</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-03-12T16:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Format with commas an |appendpipe [stats sum(*) as * by Number ...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680424#M232562</link>
      <description>&lt;P&gt;Hi! thank you for responding soon! I appreciate that.&lt;/P&gt;&lt;P&gt;I am trying to put commas formatting to my&amp;nbsp; Totals Row that I builds with this :&amp;nbsp;&lt;STRONG&gt;| appendpipe [stats sum(*) as * by Number | eval UserName="Total By Number: "]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This is my row now:&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------&lt;BR /&gt;Total By Number:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1905&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2229&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1303&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1845&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1409&lt;BR /&gt;--------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the row that I am looking for the formatting way :&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------&lt;BR /&gt;Total By Number:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1,905&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2,229&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;13,03&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,845&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1,409&lt;BR /&gt;--------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 17:43:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680424#M232562</guid>
      <dc:creator>BeautyData</dc:creator>
      <dc:date>2024-03-12T17:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Format with commas an |appendpipe [stats sum(*) as * by Number ...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680428#M232564</link>
      <description>&lt;P&gt;If it is in a dashboard, you could try the thousands separator option&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 18:21:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680428#M232564</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-03-12T18:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Format with commas an |appendpipe [stats sum(*) as * by Number ...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680430#M232566</link>
      <description>&lt;P&gt;It is a report.&amp;nbsp;I did try with the format in the UI but this will lost when this run again with different dates.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 18:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680430#M232566</guid>
      <dc:creator>BeautyData</dc:creator>
      <dc:date>2024-03-12T18:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Format with commas an |appendpipe [stats sum(*) as * by Number ...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680480#M232582</link>
      <description>&lt;P&gt;That's the job for &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConversionFunctions#tostring.28.26lt.3Bvalue.26gt.3B.2C.26lt.3Bformat.26gt.3B.29" target="_blank" rel="noopener"&gt;tostring&lt;/A&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| appendpipe
    [stats sum(*) as * by Number
    | foreach *
        [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = tostring(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, "commas")]
    | eval UserName="Total By Number: "]&lt;/LI-CODE&gt;&lt;P&gt;I'm not sure why you group by "Number" but evals "UserName".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 04:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680480#M232582</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-03-13T04:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Format with commas an |appendpipe [stats sum(*) as * by Number ...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680552#M232615</link>
      <description>If you want just format those on display but not convert those to string then you should use command fielformat instead of eval inside foreach loop.&lt;BR /&gt;I'm not sure if bug in fieldformat has already fixed or not. At least some earlier versions it didn't work correctly in all cases inside foreach loop. If it didn't work then just use additional field name with eval and you could use original for calculations later.</description>
      <pubDate>Wed, 13 Mar 2024 13:50:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680552#M232615</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-03-13T13:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Format with commas an |appendpipe [stats sum(*) as * by Number ...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680658#M232657</link>
      <description>&lt;BLOCKQUOTE&gt;I'm not sure if bug in fieldformat has already fixed or not. At least some earlier versions it didn't work correctly in all cases inside foreach loop.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Nope. &amp;nbsp;These are from 9.2.0.1.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="foreach-eval.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29744iFD4579FA50EB6125/image-size/medium?v=v2&amp;amp;px=400" role="button" title="foreach-eval.png" alt="foreach-eval.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="foreach-fieldformat.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29745iCBCC0C564BA259E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="foreach-fieldformat.png" alt="foreach-fieldformat.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I begin to suspect that this is by design.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 07:56:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-with-commas-an-appendpipe-stats-sum-as-by-Number/m-p/680658#M232657</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-03-14T07:56:26Z</dc:date>
    </item>
  </channel>
</rss>

