<?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 split a row by 2 field values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297902#M165044</link>
    <description>&lt;P&gt;HI @Trishant,&lt;/P&gt;

&lt;P&gt;How you want to split this event between 2 vendors?? I mean if we say for span column "&lt;CODE&gt;0-3&lt;/CODE&gt;" then how we can split value "&lt;CODE&gt;96.00&lt;/CODE&gt;"?&lt;/P&gt;

&lt;P&gt;And you asked about sorting of &lt;CODE&gt;0-3, 12-15, 15-18, 18-21, 3-6&lt;/CODE&gt;, do you want to sort sequence of these span columns??&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sun, 19 Nov 2017 02:30:58 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2017-11-19T02:30:58Z</dc:date>
    <item>
      <title>How to split a row by 2 field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297900#M165042</link>
      <description>&lt;P&gt;I have a sample data which I am trying to split over 2 fields.&lt;/P&gt;

&lt;P&gt;For Example:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3894i934A4867916BAC2C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;In above image we have a test case ID which has some values in Different time spans, It contains combined values form 2 different vendors let say A and B.&lt;/P&gt;

&lt;P&gt;What I need is  to split this row into 2 parts for 2 vendors one having data for A and another having data for B.???&lt;/P&gt;

&lt;P&gt;And please tell me how to sort this span buckets. 0-3, 12-15, 15-18, 18-21, 3-6......???&lt;/P&gt;</description>
      <pubDate>Sat, 18 Nov 2017 16:20:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297900#M165042</guid>
      <dc:creator>Trishant</dc:creator>
      <dc:date>2017-11-18T16:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a row by 2 field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297901#M165043</link>
      <description>&lt;P&gt;@Trishant, you would need to add more details. What is the field to identify VendorA and VendorB. What is your current SPL? Also can you sample some event data (after mocking/anonymizing any sensitive information)?&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 02:21:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297901#M165043</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-19T02:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a row by 2 field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297902#M165044</link>
      <description>&lt;P&gt;HI @Trishant,&lt;/P&gt;

&lt;P&gt;How you want to split this event between 2 vendors?? I mean if we say for span column "&lt;CODE&gt;0-3&lt;/CODE&gt;" then how we can split value "&lt;CODE&gt;96.00&lt;/CODE&gt;"?&lt;/P&gt;

&lt;P&gt;And you asked about sorting of &lt;CODE&gt;0-3, 12-15, 15-18, 18-21, 3-6&lt;/CODE&gt;, do you want to sort sequence of these span columns??&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 02:30:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297902#M165044</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2017-11-19T02:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a row by 2 field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297903#M165045</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;I have used below search to get this view&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;sort +iteration | eval testId = testId + ": " + testcase | &lt;BR /&gt;
rename testId as Test_CaseID, build as Build, duration as Time_Taken | where (Build= "Vendor A" OR Build= "Vendor B") |&lt;BR /&gt;
chart count(Test_CaseID) as Total_Runs over Test_CaseID by Time_Taken  bins=100|&lt;BR /&gt;
untable Test_CaseID, Time_Taken, count |&lt;BR /&gt;
eventstats sum(count) as Total by Test_CaseID|&lt;BR /&gt;
eval perc=round(count*100/Total,2) | fields - count(Total) |&lt;BR /&gt;
xyseries Test_CaseID, Time_Taken, perc|&lt;/P&gt;

&lt;P&gt;so this 96.00 is coming from Vendor A + Vendor B&lt;BR /&gt;
what I want is 2 rows with same Test_CaseID(1 for A and another for B)&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Yes, I want to sort sequence of these span columns like 0-3, 3-6, 6-9, 9-12.....&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:50:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297903#M165045</guid>
      <dc:creator>Trishant</dc:creator>
      <dc:date>2020-09-29T16:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a row by 2 field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297904#M165046</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have used below search to get this view&lt;/P&gt;

&lt;P&gt;sort +iteration | eval testId = testId + ": " + testcase | &lt;BR /&gt;
rename testId as Test_CaseID, build as Build, duration as Time_Taken | where (Build= "Vendor A" OR Build= "Vendor B") |&lt;BR /&gt;
chart count(Test_CaseID) as Total_Runs over Test_CaseID by Time_Taken bins=100|&lt;BR /&gt;
untable Test_CaseID, Time_Taken, count |&lt;BR /&gt;
eventstats sum(count) as Total by Test_CaseID|&lt;BR /&gt;
eval perc=round(count*100/Total,2) | fields - count(Total) |&lt;BR /&gt;
xyseries Test_CaseID, Time_Taken, perc|&lt;/P&gt;

&lt;P&gt;so this 96.00 is coming from Vendor A + Vendor B&lt;BR /&gt;
what I want is 2 rows with same Test_CaseID(1 for A and another for B)&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Yes, I want to sort sequence of these span columns like 0-3, 3-6, 6-9, 9-12.....&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Hope this might help you in some extent...&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:50:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297904#M165046</guid>
      <dc:creator>Trishant</dc:creator>
      <dc:date>2020-09-29T16:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a row by 2 field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297905#M165047</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;I have used below search to get this view&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;sort +iteration | eval testId = testId + ": " + testcase | &lt;BR /&gt;
rename testId as Test_CaseID, build as Build, duration as Time_Taken | where (Build= "Vendor A" OR Build= "Vendor B") |&lt;BR /&gt;
chart count(Test_CaseID) as Total_Runs over Test_CaseID by Time_Taken bins=100|&lt;BR /&gt;
untable Test_CaseID, Time_Taken, count |&lt;BR /&gt;
eventstats sum(count) as Total by Test_CaseID|&lt;BR /&gt;
eval perc=round(count*100/Total,2) | fields - count(Total) |&lt;BR /&gt;
xyseries Test_CaseID, Time_Taken, perc|&lt;/P&gt;

&lt;P&gt;so this 96.00 is coming from Vendor A + Vendor B&lt;BR /&gt;
what I want is 2 rows with same Test_CaseID(1 for A and another for B)&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Yes, I want to sort sequence of these span columns like 0-3, 3-6, 6-9, 9-12.....&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:51:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297905#M165047</guid>
      <dc:creator>Trishant</dc:creator>
      <dc:date>2020-09-29T16:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a row by 2 field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297906#M165048</link>
      <description>&lt;P&gt;HI @Trishant,&lt;BR /&gt;
Got it.&lt;/P&gt;

&lt;P&gt;Can you share some sample event &amp;amp; expected output ?? So I can try to design search for you.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 16:50:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297906#M165048</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2017-11-20T16:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a row by 2 field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297907#M165049</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;P&gt;...base search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where build="Vendor A" OR build="Vendor B"
| sort +iteration 
| eval Test_CaseID = testId + ": " + testcase + "#" + build
| chart count(Test_CaseID) as Total_Runs over Test_CaseID by duration bins=100
| untable Test_CaseID, Time_Taken, count 
| eventstats sum(count) as Total by Test_CaseID
| eval perc=round(count*100/Total,2) 
| fields - count(Total) 
| xyseries Test_CaseID, Time_Taken, perc
| rex field=Test_CaseID "(?&amp;lt;Test_CaseID&amp;gt;[^#]+)#(?&amp;lt;Build&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There is no easy way to sort those dynamic columns for bins of Time Taken as they're treated as string when converted to columns.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 20:18:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-a-row-by-2-field-values/m-p/297907#M165049</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-11-20T20:18:53Z</dc:date>
    </item>
  </channel>
</rss>

