<?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: splitting many rows in columns in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449087#M42057</link>
    <description>&lt;P&gt;@niketnilay : I have to order a small table with 12 lines, dividing them, for reasons of space in the dashboard,  6 in the first two columns and 6 in the second&lt;/P&gt;</description>
    <pubDate>Thu, 09 May 2019 07:30:46 GMT</pubDate>
    <dc:creator>fabrizioalleva</dc:creator>
    <dc:date>2019-05-09T07:30:46Z</dc:date>
    <item>
      <title>splitting many rows in columns</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449084#M42054</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I need to transform  this table:&lt;/P&gt;

&lt;P&gt;Fruits    Euro&lt;BR /&gt;
Apples  2&lt;BR /&gt;
Banana 1&lt;BR /&gt;
Strawberry 3&lt;BR /&gt;
Ananas 3 &lt;BR /&gt;
Blueberry 4&lt;BR /&gt;
Pear  2&lt;/P&gt;

&lt;P&gt;into :&lt;BR /&gt;
Fruits    Euro  Fruits    Euro&lt;BR /&gt;
apples   2        Banana  1&lt;BR /&gt;
Strawb  3         Ananas  3&lt;BR /&gt;
Bluebe  4         Pear       2&lt;/P&gt;

&lt;P&gt;Is there a way ?&lt;/P&gt;

&lt;P&gt;Thanks Fabrizio&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 13:51:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449084#M42054</guid>
      <dc:creator>fabrizioalleva</dc:creator>
      <dc:date>2019-05-08T13:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: splitting many rows in columns</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449085#M42055</link>
      <description>&lt;P&gt;You cannot have the same field name in a table have multiple columns when making a table in Splunk.  You would need to do a hack to get it to work by appending a space to the name so it appears to be the same but is actually different:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1
| fields - _time
| eval data="Apples 2
Banana 1
Strawberry 3
Ananas 3 
Blueberry 4
Pear 2"
| rex field=data max_match=0 "(?&amp;lt;data&amp;gt;[^\n\e]+)"
| eval data=trim(data)
| mvexpand data
| rex field=data "(?&amp;lt;Fruits&amp;gt;[^\s]+) (?&amp;lt;Euro&amp;gt;\d+)"
| table Fruits Euro
| streamstats reset_after="count=2" count
| streamstats values(Fruits) as joiner window=1 current=f
| eval "Fruits "=if(count=2, Fruits, null())
| eval "Euro "=if(count=2, Euro, null())
| eval joiner=if(count=1, Fruits, joiner)
| eval Fruits=if(count=1, Fruits, null())
| eval Euro=if(count=1, Euro, null())
| stats values(Fruits) as Fruits values(Euro) as Euro values("Fruits ") as "Fruits " values("Euro ") as "Euro " by joiner
| fields - joiner
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 May 2019 14:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449085#M42055</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2019-05-08T14:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: splitting many rows in columns</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449086#M42056</link>
      <description>&lt;P&gt;@fabrizioalleva what is the criteria for moving rows to column?&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 16:05:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449086#M42056</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-05-08T16:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: splitting many rows in columns</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449087#M42057</link>
      <description>&lt;P&gt;@niketnilay : I have to order a small table with 12 lines, dividing them, for reasons of space in the dashboard,  6 in the first two columns and 6 in the second&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 07:30:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449087#M42057</guid>
      <dc:creator>fabrizioalleva</dc:creator>
      <dc:date>2019-05-09T07:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: splitting many rows in columns</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449088#M42058</link>
      <description>&lt;P&gt;PERFECT!!!!! I've to adjust it for my  data!!&lt;BR /&gt;
Thanks a lot&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 07:36:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449088#M42058</guid>
      <dc:creator>fabrizioalleva</dc:creator>
      <dc:date>2019-05-09T07:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: splitting many rows in columns</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449089#M42059</link>
      <description>&lt;P&gt;Glad it worked for you.  I'm converting my comment to an answer.  If you could please accept it once it updates, I would appreciate it.  Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 10:42:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/splitting-many-rows-in-columns/m-p/449089#M42059</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2019-05-09T10:42:34Z</dc:date>
    </item>
  </channel>
</rss>

