<?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 to convert String values into factor variable? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348516#M170244</link>
    <description>&lt;P&gt;I want to know how many times that  specific http request is requested and what were the corresponding response times for all those requests ... and some similar other calculation.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Apr 2018 13:42:11 GMT</pubDate>
    <dc:creator>zacksoft</dc:creator>
    <dc:date>2018-04-18T13:42:11Z</dc:date>
    <item>
      <title>How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348512#M170240</link>
      <description>&lt;P&gt;I have string fields; an example is "URL".&lt;/P&gt;

&lt;P&gt;I want it to convert it to numeric  / factor variable to perform statistical calculation.&lt;/P&gt;

&lt;P&gt;Example: &lt;BR /&gt;
Field URL contains values like&lt;BR /&gt;
&lt;A href="https://answers.Aplunk.com/"&gt;https://answers.Aplunk.com/&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.Bplunk.com/"&gt;https://answers.Bplunk.com/&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.Blunk.com/"&gt;https://answers.Blunk.com/&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.Aplunk.com/"&gt;https://answers.Aplunk.com/&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.Bplunk.com/"&gt;https://answers.Bplunk.com/&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.Bplunk.com/"&gt;https://answers.Bplunk.com/&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.Cplunk.com/"&gt;https://answers.Cplunk.com/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It should be converted into 1, 2, 2, 1, 2, 2, 3 &lt;/P&gt;

&lt;P&gt;(All the 1's are same type of string, 2's are same type string, and same goes with 3)&lt;/P&gt;

&lt;P&gt;I hope I explain it correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 13:18:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348512#M170240</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-04-18T13:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348513#M170241</link>
      <description>&lt;P&gt;Not sure that will work with your use case, but could you try add the following to your search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| sort &amp;lt;your_field&amp;gt;
| streamstats dc(&amp;lt;your_field&amp;gt;) as num
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Apr 2018 13:30:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348513#M170241</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-18T13:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348514#M170242</link>
      <description>&lt;P&gt;I tried it. Not quite sure what it did. I am hoping to see the result in a table format. Then it would be easy for me to see and  verify the result.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 13:37:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348514#M170242</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-04-18T13:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348515#M170243</link>
      <description>&lt;P&gt;Why would you need to convert the URL to a numeric value to be able to perform statistical calculations?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 13:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348515#M170243</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-04-18T13:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348516#M170244</link>
      <description>&lt;P&gt;I want to know how many times that  specific http request is requested and what were the corresponding response times for all those requests ... and some similar other calculation.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 13:42:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348516#M170244</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-04-18T13:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348517#M170245</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; | table &amp;lt;your_field&amp;gt;
 | sort &amp;lt;your_field&amp;gt;
 | streamstats dc(&amp;lt;your_field&amp;gt;) as num
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where  is the field containing url&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 13:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348517#M170245</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-18T13:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348518#M170246</link>
      <description>&lt;P&gt;But that can simply be done by &lt;CODE&gt;| stats count by url&lt;/CODE&gt; right? No need to convert it to a number first.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:08:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348518#M170246</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-04-18T14:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348519#M170247</link>
      <description>&lt;P&gt;@damien_chillet &lt;BR /&gt;
As it appears, You Sir have solved my problem.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:11:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348519#M170247</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-04-18T14:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348520#M170248</link>
      <description>&lt;P&gt;Glad it worked!&lt;BR /&gt;
I have converted my comment as an answer.&lt;BR /&gt;
Could you please accept it to close the question?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:14:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348520#M170248</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-18T14:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348521#M170249</link>
      <description>&lt;P&gt;Note: you might want to look at @FrankVI comments, you may well be able to retrieve stats without converting to numeric in the first place (unless what you wanna do is very specific and original &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:17:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348521#M170249</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-18T14:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert String values into factor variable?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348522#M170250</link>
      <description>&lt;P&gt;Thanks Frank. Your suggestion serves the purpose. In @damien_chillet 's suggestion I am able to see the urls and I can add another value next to it , like response time.&lt;BR /&gt;&lt;BR /&gt;
Example : If xxx.yyy.zzz is called 4 times , then how much time it took to respond in all those four calls separately. I am able to see it easily.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:38:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-String-values-into-factor-variable/m-p/348522#M170250</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-04-18T14:38:35Z</dc:date>
    </item>
  </channel>
</rss>

