<?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: How to apply a formula to an existing column with a variable name? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-apply-a-formula-to-an-existing-column-with-a-variable/m-p/16554#M15083</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it to work!&amp;nbsp; My main problem was that I wasn't using &lt;EM&gt;​AsColumn&lt;/EM&gt;​.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(i=0, i&amp;lt;=0, i++,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; colName =Column(char(i*10)||"V");&lt;/P&gt;&lt;P&gt;&amp;nbsp; colRP=("RP_"||char(i*10)||"V");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Column(colRP) &amp;lt;&amp;lt;Formula((100*Col Rank(:AsColumn(colName))/(1006)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jan 2016 16:24:37 GMT</pubDate>
    <dc:creator>natalie_</dc:creator>
    <dc:date>2016-01-28T16:24:37Z</dc:date>
    <item>
      <title>How to apply a formula to an existing column with a variable name?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-apply-a-formula-to-an-existing-column-with-a-variable/m-p/16553#M15082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to apply the same formula to multiple existing columns in my data table using JSL.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one column that says 0V and the other that says RP_0V.&amp;nbsp; I would like to apply a formula to column RP_0V using the 0V column.&amp;nbsp; I have to do this many times (for column RP_10V using the column 10V, etc.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a lot of trouble figuring out the syntax for it, and I bet it is pretty simple...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(i=0, i&amp;lt;=65, i++,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; colName =Column(char(i*10)||"V");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; dtSummary:("RP_"||char(i*10)||"V") = Formula(100*Col Rank(:colName)/1006);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 15:37:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-apply-a-formula-to-an-existing-column-with-a-variable/m-p/16553#M15082</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-01-28T15:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply a formula to an existing column with a variable name?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-apply-a-formula-to-an-existing-column-with-a-variable/m-p/16554#M15083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it to work!&amp;nbsp; My main problem was that I wasn't using &lt;EM&gt;​AsColumn&lt;/EM&gt;​.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(i=0, i&amp;lt;=0, i++,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; colName =Column(char(i*10)||"V");&lt;/P&gt;&lt;P&gt;&amp;nbsp; colRP=("RP_"||char(i*10)||"V");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Column(colRP) &amp;lt;&amp;lt;Formula((100*Col Rank(:AsColumn(colName))/(1006)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 16:24:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-apply-a-formula-to-an-existing-column-with-a-variable/m-p/16554#M15083</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-01-28T16:24:37Z</dc:date>
    </item>
  </channel>
</rss>

