<?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 Concatenation highlights of columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Concatenation-highlights-of-columns/m-p/766669#M94669</link>
    <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;I have a table with some columns, for example, "HIGH" and "SMART," and there are three optional values: "0," "1," and "None."&lt;/P&gt;&lt;P&gt;I want to create a new column that describes each row.&lt;/P&gt;&lt;P&gt;For example, if the first row has a "1" in the "HIGH" and "SMART" columns, the new column should contain "HIGH, SMART."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I achieve this using column formulas?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2024 08:27:49 GMT</pubDate>
    <dc:creator>Liranlev</dc:creator>
    <dc:date>2024-06-18T08:27:49Z</dc:date>
    <item>
      <title>Concatenation highlights of columns</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenation-highlights-of-columns/m-p/766669#M94669</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;I have a table with some columns, for example, "HIGH" and "SMART," and there are three optional values: "0," "1," and "None."&lt;/P&gt;&lt;P&gt;I want to create a new column that describes each row.&lt;/P&gt;&lt;P&gt;For example, if the first row has a "1" in the "HIGH" and "SMART" columns, the new column should contain "HIGH, SMART."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I achieve this using column formulas?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 08:27:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenation-highlights-of-columns/m-p/766669#M94669</guid>
      <dc:creator>Liranlev</dc:creator>
      <dc:date>2024-06-18T08:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenation highlights of columns</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenation-highlights-of-columns/m-p/766686#M94671</link>
      <description>&lt;P&gt;If you have a table like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_3-1718700703476.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65353iBCFCD8EB747C8C64/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_3-1718700703476.png" alt="jthi_3-1718700703476.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;you can use formula&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;vals = {};
If(:H == "1", Insert Into(vals,"H"));
If(:S == "1", Insert Into(vals,"S"));

Concat Items(vals, ", ");
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_4-1718700721287.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65354i0A0D5BE2C469C6BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_4-1718700721287.png" alt="jthi_4-1718700721287.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are also many other methods of achieving this&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 08:52:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenation-highlights-of-columns/m-p/766686#M94671</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-06-18T08:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenation highlights of columns</title>
      <link>https://community.jmp.com/t5/Discussions/Concatenation-highlights-of-columns/m-p/766869#M94690</link>
      <description>&lt;P&gt;What you describe is almost the application case of &lt;FONT face="courier new,courier"&gt;Combine Columns&lt;/FONT&gt; with the setting&amp;nbsp;&lt;CODE class=" language-jsl"&gt;Selected Columns are Indicator Columns.&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But is will complain about the &lt;STRONG&gt;None&lt;/STRONG&gt;s.&lt;/P&gt;&lt;P&gt;To fix the issue, get rid of the None values -&amp;nbsp; either via Recode or by just converting the columns to data type numeric:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "test",
	Add Rows( 5 ),
	New Column( "H",
		Character,
		Set Values( {"None", "1", "0", "1", "1"} )
	),
	New Column( "S",
		Character,
		Set Values( {"1", "0", "1", "None", "1"} )
	)
);

:H &amp;lt;&amp;lt; Set Data Type( Numeric );
:S &amp;lt;&amp;lt; Set Data Type( Numeric );

dt &amp;lt;&amp;lt; Combine Columns(
	columns( :H, :S ),
	Column Name( "summary" ),
	Delimiter( "," ),
	Selected Columns are Indicator Columns( 1 )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jun 2024 18:12:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Concatenation-highlights-of-columns/m-p/766869#M94690</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-06-18T18:12:39Z</dc:date>
    </item>
  </channel>
</rss>

