<?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 How to trim column in table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643396#M222873</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running the following query.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;index=sys_tools_ecc-appd application_name=CAPRI-1130 | table * | search source=business_transactions business_transactions.metricName="*Average Response Time (ms)*" | timechart avg(business_transactions.metricValues{}.value) by business_transactions.metricPath&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The business_transactions.metricPath names are all too long example below:&lt;/P&gt;
&lt;P&gt;1. Business Transaction Performance|Business Transactions|APP|/dbq/ecrud|Average Response Time (ms)&lt;/P&gt;
&lt;P&gt;2. Business Transaction Performance|Business Transactions|APP|/dbq/BTSXDRRequest_PortTypeWS|Average Response Time (ms)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need to trim them from both side. I need to remove&amp;nbsp;&amp;nbsp;"Business Transaction Performance|Business Transactions" from the front and "|Average Response Time (ms)" from the back before displaying them on column.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 May 2023 13:49:26 GMT</pubDate>
    <dc:creator>naujla85</dc:creator>
    <dc:date>2023-05-15T13:49:26Z</dc:date>
    <item>
      <title>How to trim column in table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643396#M222873</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running the following query.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;index=sys_tools_ecc-appd application_name=CAPRI-1130 | table * | search source=business_transactions business_transactions.metricName="*Average Response Time (ms)*" | timechart avg(business_transactions.metricValues{}.value) by business_transactions.metricPath&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The business_transactions.metricPath names are all too long example below:&lt;/P&gt;
&lt;P&gt;1. Business Transaction Performance|Business Transactions|APP|/dbq/ecrud|Average Response Time (ms)&lt;/P&gt;
&lt;P&gt;2. Business Transaction Performance|Business Transactions|APP|/dbq/BTSXDRRequest_PortTypeWS|Average Response Time (ms)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need to trim them from both side. I need to remove&amp;nbsp;&amp;nbsp;"Business Transaction Performance|Business Transactions" from the front and "|Average Response Time (ms)" from the back before displaying them on column.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 13:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643396#M222873</guid>
      <dc:creator>naujla85</dc:creator>
      <dc:date>2023-05-15T13:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim column in table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643401#M222877</link>
      <description>&lt;P&gt;Try something like this before the timechart command&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval business_transactions.metricPath=replace(business_transactions.metricPath,"Business Transaction Performance\|Business Transactions\"","")
| eval business_transactions.metricPath=replace(business_transactions.metricPath,"\|Average Response Time (ms)","")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 May 2023 14:38:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643401#M222877</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-15T14:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim column in table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643428#M222883</link>
      <description>&lt;P&gt;its showing me null value.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 17:02:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643428#M222883</guid>
      <dc:creator>naujla85</dc:creator>
      <dc:date>2023-05-15T17:02:44Z</dc:date>
    </item>
    <item>
      <title>How to trim column in table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643429#M222884</link>
      <description>&lt;P&gt;Use an AS clause in the timechart command to specify a shorter name for the average value field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart avg(business_transactions.metricValues{}.value) as avgMetricValue by business_transactions.metricPath&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or use rename&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename "Business Transaction Performance|Business Transactions|*|Average Response Time (ms)" as *&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 17:07:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643429#M222884</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-05-15T17:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to trim column in table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643434#M222886</link>
      <description>&lt;P&gt;second solution worked for me thank you!!!!!&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 18:03:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-trim-column-in-table/m-p/643434#M222886</guid>
      <dc:creator>naujla85</dc:creator>
      <dc:date>2023-05-15T18:03:43Z</dc:date>
    </item>
  </channel>
</rss>

