<?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: Combine Data by Row in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821742#M100082</link>
    <description>&lt;P&gt;Here is one way&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Current Data Table();	

custom_sql = Eval Insert(
"\[SELECT Product, GROUP_CONCAT(DISTINCT CAST("Lot" as TEXT)) as "Lots in Product"
FROM t1
GROUP BY Product
]\");

dt_concat = Query(
	Table(dt, "t1"),
	custom_sql
);&lt;BR /&gt;&lt;BR /&gt;New window("Tablebox",&amp;lt;&amp;lt;Type("Dialog"),&lt;BR /&gt;Data Table Box( dt_concat ));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Dec 2024 14:48:17 GMT</pubDate>
    <dc:creator>Jackie_</dc:creator>
    <dc:date>2024-12-10T14:48:17Z</dc:date>
    <item>
      <title>Combine Data by Row</title>
      <link>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821666#M100077</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do the following:&lt;/P&gt;&lt;P&gt;Given &lt;STRONG&gt;Product&lt;/STRONG&gt; Column and &lt;STRONG&gt;Lot&lt;/STRONG&gt; Column, I need to create "&lt;STRONG&gt;Lots in Product&lt;/STRONG&gt;" Column so that it combines all the "lots' based on the same product.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alex19_0-1733840030799.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71009i4D11CF40384CAFD6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alex19_0-1733840030799.png" alt="Alex19_0-1733840030799.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The final purpose is to get the Tabulate:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alex19_1-1733840281096.png" style="width: 261px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71010iEF47D240D0D5043A/image-dimensions/261x121?v=v2" width="261" height="121" role="button" title="Alex19_1-1733840281096.png" alt="Alex19_1-1733840281096.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The X1, X2, X3, X4 does not have to be present in the single cell, this will work as well (whichever is easier):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alex19_2-1733840342515.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71011iFA42048C1BD69036/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alex19_2-1733840342515.png" alt="Alex19_2-1733840342515.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Manually this process is insane when I have a table of thousands of datapoints.&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;JMP table is attached.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Alex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:22:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821666#M100077</guid>
      <dc:creator>Alex19</dc:creator>
      <dc:date>2024-12-10T14:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Combine Data by Row</title>
      <link>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821730#M100080</link>
      <description>&lt;P&gt;Very common question.&lt;/P&gt;&lt;P&gt;There are a lot of tricks and workarounds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a future version of JMP it will be very easy:&lt;/P&gt;&lt;P&gt;&lt;LI-MESSAGE title="🙏 Summary and Tabulate: add aggregation option for Character columns" uid="659314" url="https://community.jmp.com/t5/JMP-Wish-List/Summary-and-Tabulate-add-aggregation-option-for-Character/m-p/659314#U659314" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;BR /&gt;... if enough users follow the link and vote.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:38:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821730#M100080</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-10T14:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Combine Data by Row</title>
      <link>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821742#M100082</link>
      <description>&lt;P&gt;Here is one way&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Current Data Table();	

custom_sql = Eval Insert(
"\[SELECT Product, GROUP_CONCAT(DISTINCT CAST("Lot" as TEXT)) as "Lots in Product"
FROM t1
GROUP BY Product
]\");

dt_concat = Query(
	Table(dt, "t1"),
	custom_sql
);&lt;BR /&gt;&lt;BR /&gt;New window("Tablebox",&amp;lt;&amp;lt;Type("Dialog"),&lt;BR /&gt;Data Table Box( dt_concat ));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:48:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821742#M100082</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2024-12-10T14:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Combine Data by Row</title>
      <link>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821745#M100083</link>
      <description>&lt;P&gt;another one:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dt &amp;lt;&amp;lt; New Column( "rank", Formula( Col Rank( 1, :Product ) ), );

dtsplit = dt &amp;lt;&amp;lt; Split(
	Split By( :rank ),
	Split( :Lot ),
	Group( :Product ),
	Remaining Columns( Drop All ), 

);

cols = dt split &amp;lt;&amp;lt; get column names();
cols = cols[2 :: N Items( cols )];

dt split &amp;lt;&amp;lt; New Column( "concat", Character, Set Each value( Concat Items( cols, "," ) ) );

dt &amp;lt;&amp;lt; Update(
	With( dt split),
	Match Columns( :Product = :Product ),
	Add Columns from Update Table( :concat ),
	Replace Columns in Main Table( None )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:47:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821745#M100083</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-10T14:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Combine Data by Row</title>
      <link>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821747#M100084</link>
      <description>&lt;P&gt;Works beautifully! Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:48:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Combine-Data-by-Row/m-p/821747#M100084</guid>
      <dc:creator>Alex19</dc:creator>
      <dc:date>2024-12-10T14:48:28Z</dc:date>
    </item>
  </channel>
</rss>

