<?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: How should I rename a dynamic value after using the timechart count by? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-should-I-rename-a-dynamic-value-after-using-the-timechart/m-p/421323#M121013</link>
    <description>&lt;P&gt;Hi, ns0:Code has more than one value.&lt;BR /&gt;
And want help on one more thing, that I want to rename it with a dynamic value and not with "ABC". So is there any concept of variables??&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Dec 2018 07:11:03 GMT</pubDate>
    <dc:creator>vaibhavvijay9</dc:creator>
    <dc:date>2018-12-07T07:11:03Z</dc:date>
    <item>
      <title>How should I rename a dynamic value after using the timechart count by?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-should-I-rename-a-dynamic-value-after-using-the-timechart/m-p/421321#M121011</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am using this search string as below :&lt;BR /&gt;
(some data- index, host, etc)............. | xmlkv | search "ns0:ApplicationFunction"=NotifyBusinessPartnerUpdate_Update_1 | &lt;STRONG&gt;timechart count by ns0:Code | rename &lt;EM&gt;LifeRetailCBCustomerSolife-Update-007&lt;/EM&gt; as "ABC"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Output: &lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/256743-actual-output.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;BUT&lt;/STRONG&gt; instead of hardcoded &lt;EM&gt;LifeRetailCBCustomerSolife-Update-007&lt;/EM&gt; I want it to be dynamic as &lt;EM&gt;ns0:Code&lt;/EM&gt; , see below :&lt;BR /&gt;
(some data- index, host, etc)............. | xmlkv | search "ns0:ApplicationFunction"=NotifyBusinessPartnerUpdate_Update_1 | &lt;STRONG&gt;timechart count by ns0:Code | rename &lt;EM&gt;ns0:Code&lt;/EM&gt; as "ABC"&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Output :&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/256744-desired-output.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;So please help me to get the output same as first but using the second way of search string.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;

&lt;P&gt;*Please don't go with the attached images filenames.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:16:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-should-I-rename-a-dynamic-value-after-using-the-timechart/m-p/421321#M121011</guid>
      <dc:creator>vaibhavvijay9</dc:creator>
      <dc:date>2020-09-29T22:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: How should I rename a dynamic value after using the timechart count by?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-should-I-rename-a-dynamic-value-after-using-the-timechart/m-p/421322#M121012</link>
      <description>&lt;P&gt;Hi If ns0:Code has only 1 value you can make the renaming before the timechart command&lt;BR /&gt;
so it should be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(some data- index, host, etc)............. 
| xmlkv 
| search "ns0:ApplicationFunction"=NotifyBusinessPartnerUpdate_Update_1 
| replace "*" in ns0:Code with "ABC"
| timechart count by ns0:Code 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Dec 2018 16:12:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-should-I-rename-a-dynamic-value-after-using-the-timechart/m-p/421322#M121012</guid>
      <dc:creator>sergeye</dc:creator>
      <dc:date>2018-12-03T16:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: How should I rename a dynamic value after using the timechart count by?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-should-I-rename-a-dynamic-value-after-using-the-timechart/m-p/421323#M121013</link>
      <description>&lt;P&gt;Hi, ns0:Code has more than one value.&lt;BR /&gt;
And want help on one more thing, that I want to rename it with a dynamic value and not with "ABC". So is there any concept of variables??&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 07:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-should-I-rename-a-dynamic-value-after-using-the-timechart/m-p/421323#M121013</guid>
      <dc:creator>vaibhavvijay9</dc:creator>
      <dc:date>2018-12-07T07:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: How should I rename a dynamic value after using the timechart count by?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-should-I-rename-a-dynamic-value-after-using-the-timechart/m-p/421324#M121014</link>
      <description>&lt;P&gt;Use values mapping. E.g. :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;index and filter&amp;gt; | xmlkv | search "ns0:ApplicationFunction"=NotifyBusinessPartnerUpdate_Update_1
| eval dynvalue=case(ns0:Code="value1","label1", ns0:Code="value2","label2", ....)
| timechart count by dynvalue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Dec 2018 07:26:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-should-I-rename-a-dynamic-value-after-using-the-timechart/m-p/421324#M121014</guid>
      <dc:creator>petom</dc:creator>
      <dc:date>2018-12-07T07:26:17Z</dc:date>
    </item>
  </channel>
</rss>

