<?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: Selecting all remaining fields as data fields in xyseries in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Selecting-all-remaining-fields-as-data-fields-in-xyseries/m-p/511440#M4665</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224246"&gt;@kshashank004&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"your search"
|foreach * [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;:{yAxis}=&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;]&lt;/LI-CODE&gt;&lt;P&gt;Or if don't want actual fields and only want to persist xAxis&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"your search"
|eval _xaxis=xAxis
|foreach * [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;:{audittrail}=&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;]|fields *:*
|rename _xaxis as xAxis&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jul 2020 05:18:20 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2020-07-29T05:18:20Z</dc:date>
    <item>
      <title>Selecting all remaining fields as data fields in xyseries</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Selecting-all-remaining-fields-as-data-fields-in-xyseries/m-p/511419#M4664</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to use xyseries to transform the table and needed to know a way to select all columns as data field for xyseries command.&lt;/P&gt;&lt;P&gt;For instance:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table like this:&lt;/P&gt;&lt;TABLE border="1" width="63.99968394437421%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;xAxis&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;yAxis&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;randomField1&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;randomField2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;abc&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;ghi&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;def&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;ghi&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;22&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;42&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the output as follows:&lt;/P&gt;&lt;TABLE border="1" width="418.20000000000005px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="138.65625px" height="25px"&gt;xAxis&lt;/TD&gt;&lt;TD width="139.1875px" height="25px"&gt;randomField1: ghi&lt;/TD&gt;&lt;TD width="139.375px" height="25px"&gt;randomField2:ghi&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="138.65625px" height="25px"&gt;abc&lt;/TD&gt;&lt;TD width="139.1875px" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="139.375px" height="25px"&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="138.65625px" height="25px"&gt;def&lt;/TD&gt;&lt;TD width="139.1875px" height="25px"&gt;22&lt;/TD&gt;&lt;TD width="139.375px" height="25px"&gt;42&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can do this using the following command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;xyseries xAxix, yAxis, randomField1, randomField2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the catch is that the field names and number of fields will not be the same for each search. Meaning, in the next search I might have 3 fields (randomField1, randomField2, randomField3).&lt;/P&gt;&lt;P&gt;Is there any way of using xyseries with dynamic field names? Or is there any other command that can be used?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 21:33:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Selecting-all-remaining-fields-as-data-fields-in-xyseries/m-p/511419#M4664</guid>
      <dc:creator>kshashank004</dc:creator>
      <dc:date>2020-07-28T21:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting all remaining fields as data fields in xyseries</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Selecting-all-remaining-fields-as-data-fields-in-xyseries/m-p/511440#M4665</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224246"&gt;@kshashank004&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"your search"
|foreach * [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;:{yAxis}=&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;]&lt;/LI-CODE&gt;&lt;P&gt;Or if don't want actual fields and only want to persist xAxis&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"your search"
|eval _xaxis=xAxis
|foreach * [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;:{audittrail}=&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;]|fields *:*
|rename _xaxis as xAxis&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 05:18:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Selecting-all-remaining-fields-as-data-fields-in-xyseries/m-p/511440#M4665</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-07-29T05:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting all remaining fields as data fields in xyseries</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Selecting-all-remaining-fields-as-data-fields-in-xyseries/m-p/511474#M4666</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="xAxis,yAxis,randomField1,randomField2,randomField3
abc,ghi,1,32,56
def,ghi,22,42,67" 
| multikv forceheader=1 
| table xAxis,yAxis,randomField1,randomField2,randomField3 
| xyseries xAxis,yAxis 
    [| makeresults 
    | eval _raw="xAxis,yAxis,randomField1,randomField2,randomField3
abc,ghi,1,32,56
def,ghi,22,42,67" 
    | multikv forceheader=1 
    | table xAxis,yAxis,randomField1,randomField2,randomField3 
    | untable xAxis randomField count 
    | where randomField!="yAxis" 
    | stats values(randomField) as query 
    | nomv query 
    | return $query ]&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;xyseries&lt;/STRONG&gt; needs double search.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 09:12:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Selecting-all-remaining-fields-as-data-fields-in-xyseries/m-p/511474#M4666</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-29T09:12:25Z</dc:date>
    </item>
  </channel>
</rss>

