<?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 extract a value from a field name ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550416#M156202</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is exactly what I needed !&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot !&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 May 2021 14:24:33 GMT</pubDate>
    <dc:creator>mah</dc:creator>
    <dc:date>2021-05-04T14:24:33Z</dc:date>
    <item>
      <title>how to extract a value from a field name ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550378#M156180</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a table like that :&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="40.842245852944856%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="5.614406779661017%"&gt;test&lt;/TD&gt;&lt;TD width="5.614406779661017%"&gt;total&lt;/TD&gt;&lt;TD width="11.228813559322035%"&gt;&lt;STRONG&gt;productA&lt;/STRONG&gt;_xxxx&lt;/TD&gt;&lt;TD width="8.79237288135593%"&gt;&lt;STRONG&gt;productA&lt;/STRONG&gt;_zzzz&lt;/TD&gt;&lt;TD width="3.125%"&gt;&lt;STRONG&gt;productB&lt;/STRONG&gt;_xxxx&lt;/TD&gt;&lt;TD width="3.125%"&gt;&lt;STRONG&gt;productB&lt;/STRONG&gt;_zzzz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="5.614406779661017%"&gt;1&lt;/TD&gt;&lt;TD width="5.614406779661017%"&gt;22&lt;/TD&gt;&lt;TD width="11.228813559322035%"&gt;0.23&lt;/TD&gt;&lt;TD width="8.79237288135593%"&gt;0.36&lt;/TD&gt;&lt;TD width="3.125%"&gt;0.44&lt;/TD&gt;&lt;TD width="3.125%"&gt;0.55&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want is a table like that :&lt;/P&gt;&lt;TABLE border="1" width="442px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="40px"&gt;test&lt;/TD&gt;&lt;TD width="40px"&gt;total&lt;/TD&gt;&lt;TD width="68.8px"&gt;object&lt;/TD&gt;&lt;TD width="108.8px"&gt;xxxx&lt;/TD&gt;&lt;TD width="183.2px"&gt;zzzz&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="40px"&gt;1&lt;/TD&gt;&lt;TD width="40px"&gt;22&lt;/TD&gt;&lt;TD width="68.8px"&gt;&lt;STRONG&gt;productA&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="108.8px"&gt;0.23&lt;/TD&gt;&lt;TD width="183.2px"&gt;0.36&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="40px"&gt;1&lt;/TD&gt;&lt;TD width="40px"&gt;22&lt;/TD&gt;&lt;TD width="68.8px"&gt;&lt;STRONG&gt;productB&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="108.8px"&gt;0.44&lt;/TD&gt;&lt;TD width="183.2px"&gt;0.55&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I extract "product" from the name of the field ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me please ?&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 12:27:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550378#M156180</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2021-05-04T12:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a value from a field name ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550383#M156183</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="product_xxxx	product_zzzz
0.23	0.36"
| multikv forceheader=1
| fields - _* linecount



| transpose 0
| eval column=mvindex(split(column,"_"),1)
| transpose 0 header_field=column
| fields - column
| eval object="product"&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 May 2021 12:02:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550383#M156183</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-04T12:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a value from a field name ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550392#M156187</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I edited my post because it does not suit with my whole table.&lt;/P&gt;&lt;P&gt;Please look at my first post I have just edited.&lt;/P&gt;&lt;P&gt;Thanks a lot!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 12:29:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550392#M156187</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2021-05-04T12:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a value from a field name ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550411#M156199</link>
      <description>&lt;P&gt;It nearly always helps to have a fuller picture!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="test	total	productA_xxxx	productA_zzzz	productB_xxxx	productB_zzzz
1	22	0.23	0.36	0.44	0.55"
| multikv forceheader=1
| fields - _* linecount


| eval testtotal=test."|".total
| fields - test total
| untable testtotal product value
| eval object=mvindex(split(product,"_"),0)
| eval product=mvindex(split(product,"_"),1)
| eval testtotalobject=testtotal."|".object
| xyseries testtotalobject product value
| eval test=mvindex(split(testtotalobject,"|"),0)
| eval total=mvindex(split(testtotalobject,"|"),1)
| eval object=mvindex(split(testtotalobject,"|"),2)
| fields - testtotalobject
| table test total object *&lt;/LI-CODE&gt;&lt;P&gt;First, combine the common fields, then untable (this is the inverse of xyseries). Now split the product into object and product. Append the object to the common field, and put back into an xyseries. Finally, split out the components of the common field.&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 14:03:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550411#M156199</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-04T14:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a value from a field name ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550416#M156202</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is exactly what I needed !&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot !&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 14:24:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-value-from-a-field-name/m-p/550416#M156202</guid>
      <dc:creator>mah</dc:creator>
      <dc:date>2021-05-04T14:24:33Z</dc:date>
    </item>
  </channel>
</rss>

