<?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 Concatenating Unique and Nonmissing Data in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/823831#M100313</link>
    <description>&lt;P&gt;I have a data table describing the tool history for a series of semiconductor lots.&amp;nbsp; In some instances, the lots can split and be run across different tools for the same processing step.&amp;nbsp; In such case, I would like to create a column with each tool concatenated to indicate that &amp;gt; 1 tool was involved.&amp;nbsp; With a lot of help, I have gotten to the point where I can identify the lots, steps and substeps where &amp;gt; 1 tool was used.&amp;nbsp; I can transpose the data to get to the tools being nominated in columns but it's still clumsy.&amp;nbsp; Can I somehow concatenate that to get the unique tools listed.&amp;nbsp; I also looked at Split but all of the options are not reflected.&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="SpannerHead_1-1734386954050.png" style="width: 976px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71283i468EA1649AAEDE6C/image-dimensions/976x100?v=v2" width="976" height="100" role="button" title="SpannerHead_1-1734386954050.png" alt="SpannerHead_1-1734386954050.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2024 22:09:59 GMT</pubDate>
    <dc:creator>SpannerHead</dc:creator>
    <dc:date>2024-12-16T22:09:59Z</dc:date>
    <item>
      <title>Concatenating Unique and Nonmissing Data</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/823831#M100313</link>
      <description>&lt;P&gt;I have a data table describing the tool history for a series of semiconductor lots.&amp;nbsp; In some instances, the lots can split and be run across different tools for the same processing step.&amp;nbsp; In such case, I would like to create a column with each tool concatenated to indicate that &amp;gt; 1 tool was involved.&amp;nbsp; With a lot of help, I have gotten to the point where I can identify the lots, steps and substeps where &amp;gt; 1 tool was used.&amp;nbsp; I can transpose the data to get to the tools being nominated in columns but it's still clumsy.&amp;nbsp; Can I somehow concatenate that to get the unique tools listed.&amp;nbsp; I also looked at Split but all of the options are not reflected.&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="SpannerHead_1-1734386954050.png" style="width: 976px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71283i468EA1649AAEDE6C/image-dimensions/976x100?v=v2" width="976" height="100" role="button" title="SpannerHead_1-1734386954050.png" alt="SpannerHead_1-1734386954050.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 22:09:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/823831#M100313</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2024-12-16T22:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Unique and Nonmissing Data</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/823843#M100315</link>
      <description>&lt;P&gt;Here is a formula that will work to create your Desired Result column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;As Constant( dt = Current Data Table() );
Concat Items( Associative Array( dt[Row(), 0] ) &amp;lt;&amp;lt; get keys, "/" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Dec 2024 23:00:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/823843#M100315</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-12-16T23:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Unique and Nonmissing Data</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/823986#M100336</link>
      <description>&lt;P&gt;txnelson&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a huge step forward.&amp;nbsp; Is there an easy way to dodge the first 4 columns from the equation?&amp;nbsp; Columns 5 onwards have the relevant data.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 14:29:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/823986#M100336</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2024-12-17T14:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Unique and Nonmissing Data</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/823998#M100342</link>
      <description>&lt;P&gt;Here is one way to do it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;As Constant(
	dt = Current Data Table();
	start = 5;
	stop = N Cols( dt );
);
Concat Items( Associative Array( dt[Row(), Index( start, stop )] ) &amp;lt;&amp;lt; get keys, "/" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As a strong suggestion, please take the time to go to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help=&amp;gt;JMP Online Help&lt;/P&gt;
&lt;P&gt;and read the section on Scripting Guide to familiarize yourself with JSL and scripting&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 16:36:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/823998#M100342</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-12-17T16:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Unique and Nonmissing Data</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/824225#M100367</link>
      <description>&lt;P&gt;Like myself, this is ugly but it works.&amp;nbsp; The column generated by txnelson's script can have unwanted instances of the forward slash preceding the text.&amp;nbsp; I kill off the formula in the column and replace with a different column using regex to eliminate any preceding /.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	New Column("Tools2", Character, "Nominal", Formula(As Constant(
	dt = Current Data Table();
	start = 6;
	stop = N Cols( dt );
);
Concat Items( Associative Array( dt[Row(), Index( start, stop )] ) &amp;lt;&amp;lt; get keys, "/" );));

	Wait(1);
	Data Table( "Transpose of Tool_History" ):Tools2 &amp;lt;&amp;lt; Delete Formula;

colList = Data Table( "Transpose of Tool_History" ) &amp;lt;&amp;lt; Get Column Names( String );
 
For( i = 1, i &amp;lt;= N Cols( Data Table( "Transpose of Tool_History" ) ), i++,
	If( Contains( colList[i], "Row" ), /* select only columns with Row
	in the name */
		Column( colList[i] ) &amp;lt;&amp;lt; Set Selected( 1 );
		
		
	)
);

Data Table( "Transpose of Tool_History" ) &amp;lt;&amp;lt; Delete Columns();

	New Column("Tools", Character, "Nominal", Formula(Regex(:Tools2, "\w.*")));
	
	Wait(1);
	Data Table( "Transpose of Tool_History" ):Tools &amp;lt;&amp;lt; Delete Formula;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Dec 2024 14:30:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/824225#M100367</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2024-12-18T14:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Unique and Nonmissing Data</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/824249#M100368</link>
      <description>&lt;P&gt;You are going to a lot of work to get your result.&amp;nbsp; Here is a simple modification to the last formula that I created that removes the preceding "/"&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Column( "Result",
	Character,
	"Nominal",
	set each value(
		As Constant(
			dt = Current Data Table();
			start = 5;
			stop = N Cols( dt );
		);
		Substr(
			Char( Concat Items( Associative Array( dt[Row(), Index( start, stop )] ) &amp;lt;&amp;lt; get keys, "/" ) ),
			2
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here is a complete example with a sample data table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create a sample data table
New Table( "Sample",
	Add Rows( 3 ),
	Set Header Height( 46 ),
	New Column( "lot",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1324567, 1324567, 1324567] )
	),
	New Column( "step", Character, "Nominal", Set Values( {"Material", "Material", "Material"} ) ),
	New Column( "substep", Character, "Nominal", Set Values( {"Deposit", "CD Measure", "Measure"} ) ),
	New Column( "Label", Character, "Nominal", Set Values( {"machine", "machine", "machine"} ) ),
	New Column( "Row 1", Character, "Nominal", Set Values( {"Machine A", "Caliper 1", "Tapemeasure 1"} ) ),
	New Column( "Row 2", Character, "Nominal", Set Values( {"", "Caliper 2", ""} ) ),
	New Column( "Row 2 2", Character, "Nominal", Set Values( {"Machine A", "", ""} ) ),
	New Column( "Row 4", Character, "Nominal", Set Values( {"", "", "Tapemeasure 3"} ) ),
	New Column( "Row 5", Character, "Nominal", Set Values( {"Machine B", "", ""} ) ),
	New Column( "Row 6", Character, "Nominal", Set Values( {"", "", ""} ) ),
	New Column( "Row 7", Character, "Nominal", Set Values( {"", "", ""} ) )
);
	
// Add the concatenated column, with the "/" removed from begining	
New Column( "Result",
	Character,
	"Nominal",
	set each value(
		As Constant(
			dt = Current Data Table();
			start = 5;
			stop = N Cols( dt );
		);
		Substr(
			Char( Concat Items( Associative Array( dt[Row(), Index( start, stop )] ) &amp;lt;&amp;lt; get keys, "/" ) ),
			2
		);
	)
);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Dec 2024 15:27:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/824249#M100368</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-12-18T15:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating Unique and Nonmissing Data</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/824350#M100384</link>
      <description>&lt;P&gt;I knew it was ugly!&amp;nbsp; Much better indeed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciated as always.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 21:00:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenating-Unique-and-Nonmissing-Data/m-p/824350#M100384</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2024-12-18T21:00:28Z</dc:date>
    </item>
  </channel>
</rss>

