<?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 JSL - table transformation in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396578#M64725</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table consisting of batch number of devices, columns of Bin # and number of devices in this bin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example for batch #11: bin 18 has 43 devices, bin 19 has 223 devices...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-06-28 101643.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33851i66A45EE32417125A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-06-28 101643.png" alt="Screenshot 2021-06-28 101643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to transform that table to have columns name as bin# and cell values as number of devices in that bin.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-06-28 102046.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33853i8B7D272D05C0F668/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-06-28 102046.png" alt="Screenshot 2021-06-28 102046.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Vadim&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:32:41 GMT</pubDate>
    <dc:creator>Vadim</dc:creator>
    <dc:date>2023-06-10T23:32:41Z</dc:date>
    <item>
      <title>JSL - table transformation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396578#M64725</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table consisting of batch number of devices, columns of Bin # and number of devices in this bin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example for batch #11: bin 18 has 43 devices, bin 19 has 223 devices...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-06-28 101643.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33851i66A45EE32417125A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-06-28 101643.png" alt="Screenshot 2021-06-28 101643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to transform that table to have columns name as bin# and cell values as number of devices in that bin.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-06-28 102046.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33853i8B7D272D05C0F668/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-06-28 102046.png" alt="Screenshot 2021-06-28 102046.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Vadim&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:32:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396578#M64725</guid>
      <dc:creator>Vadim</dc:creator>
      <dc:date>2023-06-10T23:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - table transformation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396601#M64726</link>
      <description>&lt;P&gt;Go to the pull down menu&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tables=&amp;gt;Transpose&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 19:11:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396601#M64726</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-06-28T19:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - table transformation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396653#M64733</link>
      <description>&lt;P&gt;I have tried but with no success&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to explain better my problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created new columns with names Bin 18, Bin 19, Bin 20... I need to fill corresponding columns with values from columns "# Passed X-200".&lt;/P&gt;&lt;P&gt;So for batch 11 columns Bin 18, Bin 19, Bin 20, Bin 21, Bin 22 with 43, 223, 131, 29, 4 respectively.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table question.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33863i9B1F0B9D4D9AD3EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="table question.png" alt="table question.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 21:53:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396653#M64733</guid>
      <dc:creator>Vadim</dc:creator>
      <dc:date>2021-06-28T21:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - table transformation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396659#M64734</link>
      <description>&lt;P&gt;I think the solution is to first stack the 2 groups of columns, and then to split the columns by the stacked bin values.&lt;/P&gt;
&lt;P&gt;My Sample data table......your data, just only 4 Chan and 4 #Passed columns&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1624921385182.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33864i2EF10D398387FE86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1624921385182.png" alt="txnelson_0-1624921385182.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Go to&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tables=&amp;gt;Stack&lt;/P&gt;
&lt;P&gt;and perform a Multiple series stack&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1624921462792.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33865i4E9EE9DDD5A1227E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1624921462792.png" alt="txnelson_1-1624921462792.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It creates a table that looks like:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_2-1624921611599.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33866i57F2A51ECBE3EC12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_2-1624921611599.png" alt="txnelson_2-1624921611599.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now go to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tables=&amp;gt;Split&lt;/P&gt;
&lt;P&gt;and split the data based upon the column called Data that has the Bin values&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_3-1624921730020.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33867iE882BC814AFA5924/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_3-1624921730020.png" alt="txnelson_3-1624921730020.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It produces the following table which I believe is what you want, minus the exact names for the columns&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_4-1624921820333.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33868iB410682DD68CE5B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_4-1624921820333.png" alt="txnelson_4-1624921820333.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here is the steps to do the above in a script,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dt = Open("Example.jmp");

// → Data Table( "Example" )
Data Table( "Example" ) &amp;lt;&amp;lt; Stack(
	columns(
		:Chan A, :Chan B, :Chan C, :Chan D, :"#Passed A-200"n, :"#Passed B-200"n,
		:"#Passed C-200"n, :"#Passed D-200"n
	),
	Source Label Column( "Label" ),
	Stacked Data Column( "Data" ),
	Number of Series( 2 ),
	Contiguous,
	Output Table("Stacked")
);

// Split data table
// → Data Table( "Untitled 17" )
Data Table( "Stacked" ) &amp;lt;&amp;lt; Split(
	Split By( :Data ),
	Split( :Data 2 ),
	Group( :Batch ),
	Remaining Columns( Drop All ),
	Sort by Column Property,
	Output Table( "Final")
);&lt;/CODE&gt;&lt;/PRE&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 23:12:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396659#M64734</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-06-28T23:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - table transformation</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396660#M64735</link>
      <description>&lt;P&gt;Thanks a lot!!!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 23:15:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-table-transformation/m-p/396660#M64735</guid>
      <dc:creator>Vadim</dc:creator>
      <dc:date>2021-06-28T23:15:22Z</dc:date>
    </item>
  </channel>
</rss>

