<?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: create new tables from a stack table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/create-new-tables-from-a-stack-table/m-p/359124#M60924</link>
    <description>&lt;P&gt;You could get quite far by creating column which has the "short" labels which you want to create new datatables by and then using subset platform with subset by:&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="jthi_1-1613457402409.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30257i413F877C02516E42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1613457402409.png" alt="jthi_1-1613457402409.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You just need to figure out how to separate "short" labels from your Label column. One way could be possibly with formula like&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Left(:Label, Contains(:Label, "_", -1) - 1)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Word(1, :Label, "_")&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Feb 2021 06:55:07 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-02-16T06:55:07Z</dc:date>
    <item>
      <title>create new tables from a stack table</title>
      <link>https://community.jmp.com/t5/Discussions/create-new-tables-from-a-stack-table/m-p/359119#M60923</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create new tables based on selected rows in "label" column. For example I would like to select rows starting with "Rpp" such as&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rpp_Center&lt;BR /&gt;Rpp_North&lt;BR /&gt;Rpp_East&lt;BR /&gt;Rpp_MidEast&lt;BR /&gt;Rpp_MidWest&lt;BR /&gt;Rpp_South&lt;BR /&gt;Rpp_West&lt;BR /&gt;Rpp_North&lt;/P&gt;&lt;P&gt;and create a new table called Rpp. Then, select rows starting with Wig_350&lt;/P&gt;&lt;P&gt;Wig_350_Center&lt;BR /&gt;Wig_350_East&lt;BR /&gt;Wig_350_MidEast&lt;BR /&gt;Wig_350_MidWest&lt;BR /&gt;Wig_350_South&lt;BR /&gt;Wig_350_West&lt;BR /&gt;Wig_350_North&lt;/P&gt;&lt;P&gt;and create a new table called WIG.&lt;/P&gt;&lt;P&gt;Then, repeat this for all the labels .&lt;/P&gt;&lt;P&gt;Can you show how to scrip this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:06:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/create-new-tables-from-a-stack-table/m-p/359119#M60923</guid>
      <dc:creator>Sebnem</dc:creator>
      <dc:date>2023-06-09T22:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: create new tables from a stack table</title>
      <link>https://community.jmp.com/t5/Discussions/create-new-tables-from-a-stack-table/m-p/359124#M60924</link>
      <description>&lt;P&gt;You could get quite far by creating column which has the "short" labels which you want to create new datatables by and then using subset platform with subset by:&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="jthi_1-1613457402409.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30257i413F877C02516E42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1613457402409.png" alt="jthi_1-1613457402409.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You just need to figure out how to separate "short" labels from your Label column. One way could be possibly with formula like&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Left(:Label, Contains(:Label, "_", -1) - 1)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Word(1, :Label, "_")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Feb 2021 06:55:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/create-new-tables-from-a-stack-table/m-p/359124#M60924</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-02-16T06:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: create new tables from a stack table</title>
      <link>https://community.jmp.com/t5/Discussions/create-new-tables-from-a-stack-table/m-p/359164#M60926</link>
      <description>&lt;P&gt;To do this interactively, go to the area at the top of the Row State column(the column that has the row numbers).&amp;nbsp; Right click and select&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Row Selection+&amp;gt;Select Where&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sel1.PNG" style="width: 729px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30259iE3D3016027C2319F/image-size/large?v=v2&amp;amp;px=999" role="button" title="sel1.PNG" alt="sel1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then in the dialog that is opened, specify to find rows where Label Contains "Rpp"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sel2.PNG" style="width: 559px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30260iFA7463DC2EEF94A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="sel2.PNG" alt="sel2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It will then select the rows you want&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sel3.PNG" style="width: 633px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30261iA0FB0340B805BB1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="sel3.PNG" alt="sel3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now go to&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tables=&amp;gt;Subset&lt;/P&gt;
&lt;P&gt;The Subset dialog window will open. Specify to only subset Selected Rows, and all columns&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sel4.PNG" style="width: 473px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30262iC6D6262AFC3DE4A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="sel4.PNG" alt="sel4.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It will then create the new table you want&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sel5.PNG" style="width: 567px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30263iEF77A412310CE5EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="sel5.PNG" alt="sel5.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Repeat the same process for your Wig_350 subset you want.&lt;/P&gt;
&lt;P&gt;If you want to do this using JSL, the below will do the same&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

dt &amp;lt;&amp;lt; select where( Contains( :label, "Rpp" ) == 1 );
dt &amp;lt;&amp;lt; subset( selected rows( 1 ), selected columns( 0 ) );

dt &amp;lt;&amp;lt; select where( Contains( :label, "Wig_350" ) == 1 );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Feb 2021 11:47:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/create-new-tables-from-a-stack-table/m-p/359164#M60926</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-02-16T11:47:59Z</dc:date>
    </item>
  </channel>
</rss>

