<?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: Apply same formula to several columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214208#M42834</link>
    <description>&lt;P&gt;I am a little confused about what you are asking for.&amp;nbsp; Do you want the same calculation performed on the 200 columns, or do you want to create 200 new columns and apply a formula to the new column? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, this might help.&amp;nbsp; You can easily get the names of the columns in a data table by using the "&amp;lt;&amp;lt; get column names"&amp;nbsp; message and apply it to your data table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;colNamesList = dt &amp;lt;&amp;lt; get column names(string, numeric);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The above code will create a list called colNamesList and will place in it the quoted name of each of the numeric column names.&amp;nbsp; The "string" qualifier, will make each element in the members of the colNamesList, string variables.&amp;nbsp; You can then loop through the columns and generate the calculations you need for each of the columns in the list.&lt;/P&gt;
&lt;P&gt;This is all documented in the Scripting Guide&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;Books==&amp;gt;Scripting Guide&lt;/P&gt;
&lt;P&gt;I suggest you take the time to read through the guide. &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Jun 2019 03:48:31 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2019-06-23T03:48:31Z</dc:date>
    <item>
      <title>Apply same formula to several columns</title>
      <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214197#M42832</link>
      <description>&lt;P&gt;I have about 200 columns, and I want to apply the same formula to almost all of these columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formula I want to apply is the square root of “Range 0 to 1 + 1” to each colum. I don’t want to write the name of the columns in a script because they are many.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone help me to figure out a script for this purpose?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2019 02:48:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214197#M42832</guid>
      <dc:creator>bordini</dc:creator>
      <dc:date>2019-06-23T02:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same formula to several columns</title>
      <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214208#M42834</link>
      <description>&lt;P&gt;I am a little confused about what you are asking for.&amp;nbsp; Do you want the same calculation performed on the 200 columns, or do you want to create 200 new columns and apply a formula to the new column? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, this might help.&amp;nbsp; You can easily get the names of the columns in a data table by using the "&amp;lt;&amp;lt; get column names"&amp;nbsp; message and apply it to your data table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;colNamesList = dt &amp;lt;&amp;lt; get column names(string, numeric);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The above code will create a list called colNamesList and will place in it the quoted name of each of the numeric column names.&amp;nbsp; The "string" qualifier, will make each element in the members of the colNamesList, string variables.&amp;nbsp; You can then loop through the columns and generate the calculations you need for each of the columns in the list.&lt;/P&gt;
&lt;P&gt;This is all documented in the Scripting Guide&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;Books==&amp;gt;Scripting Guide&lt;/P&gt;
&lt;P&gt;I suggest you take the time to read through the guide. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2019 03:48:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214208#M42834</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-06-23T03:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same formula to several columns</title>
      <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214210#M42835</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;yes, I want the same calculation applied to all 200 columns (which are all the continuous columns I have). I want to apply the same formula to all of them. It would be okay to create new columns with the formula applied to them, or to apply the formula directly to the columns. The formula is the square root of (Range 0 to 1 +1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for sharing that scrip with me, but it didn’t run. Do I need to do anything special to run this script? I copied and pasted it into the Script window, and hit “run”.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m sorry if my questions are too obvious. I don’t know anything about scripts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Isadora&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>Sun, 23 Jun 2019 15:43:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214210#M42835</guid>
      <dc:creator>bordini</dc:creator>
      <dc:date>2019-06-23T15:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same formula to several columns</title>
      <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214242#M42840</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11100"&gt;@bordini&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you're okay with an interactive solution, using Cols &amp;gt; Standardize Attributes will allow you to standardize the formula across your 200 new columns, and will, importantly, allow you to substitute the column references used in the formula. Here's a link to the &lt;A href="https://www.jmp.com/support/help/14-2/example-of-standardizing-a-formula.shtml" target="_blank" rel="noopener"&gt;documentation that has an example of standardizing a formula.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, you can also take advantage of JMP's Instant formulas to make the initial Range columns. Then, use Cols &amp;gt; Standardize Attributes (or right click column header &amp;gt; standardize attributes) to add the +1 to each column, while preserving the unique column references in each formula column (which is what Substitute Column Reference will do). See the video below for a quick demonstration.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-Y3aHgxaTE6gEp5zorSQwcBGgiSt-0Cc_w1280h720r174" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6064700992001" data-account="6058004218001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058004218001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-Y3aHgxaTE6gEp5zorSQwcBGgiSt-0Cc_w1280h720r174');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.jmp.com/t5/video/gallerypage/video-id/Y3aHgxaTE6gEp5zorSQwcBGgiSt-0Cc_"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2026"&gt;@jules&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//Edit: I missed the square root part. You can add that when you're editing the formula. Just select the outermost formula container and click the root button in the toolbar:&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="root.gif" style="width: 772px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17857i61E3BBC4C40821D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="root.gif" alt="root.gif" /&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>Sun, 23 Jun 2019 19:00:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214242#M42840</guid>
      <dc:creator>jules</dc:creator>
      <dc:date>2019-06-23T19:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same formula to several columns</title>
      <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214244#M42841</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2026"&gt;@jules&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That’s exactly what I needed! The video was very helpful! Thank you very much!&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2019 19:10:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214244#M42841</guid>
      <dc:creator>bordini</dc:creator>
      <dc:date>2019-06-23T19:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same formula to several columns</title>
      <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214246#M42843</link>
      <description>&lt;P&gt;Right click the column with your formula and choose "Copy Column Properties". Select all your&amp;nbsp;columns to which the&amp;nbsp;formula should be applied. Right click and&amp;nbsp;choose "Paste Multiple Columns Properties".&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="simple-translate-button isShow"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="simple-translate-panel "&gt;&lt;DIV class="simple-translate-result-wrapper"&gt;&lt;P class="simple-translate-result"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="simple-translate-candidate"&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 23 Jun 2019 21:58:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214246#M42843</guid>
      <dc:creator>Thomas1</dc:creator>
      <dc:date>2019-06-23T21:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same formula to several columns</title>
      <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214304#M42847</link>
      <description>Thank you!</description>
      <pubDate>Mon, 24 Jun 2019 13:45:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/214304#M42847</guid>
      <dc:creator>bordini</dc:creator>
      <dc:date>2019-06-24T13:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same formula to several columns</title>
      <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/263992#M51508</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have similar issue. I want to calculate natural logarithm on 10 different columns. But I want to see these calculations on new columns. For example as shown in jmp file. There are 3 columns. I want to calculate their natural logarith on 3 new columns. How can I make it easily. 3 column not a big size. But when you have 20 column it is difficult to apply the same formula for 20 column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you please help on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 08:25:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/263992#M51508</guid>
      <dc:creator>nac</dc:creator>
      <dc:date>2020-05-04T08:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same formula to several columns</title>
      <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/264004#M51509</link>
      <description>&lt;P&gt;This can be handled in the Standardize Columns Attributes&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a new column and enter in the formula you want to use&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="copy1.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/23675iF0AEA2FDB0C79617/image-size/large?v=v2&amp;amp;px=999" role="button" title="copy1.PNG" alt="copy1.PNG" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Create the number of new columns required, that you are going to want to replicate the formula for&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="copy2.PNG" style="width: 670px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/23676i15BDF8215105D0FC/image-size/large?v=v2&amp;amp;px=999" role="button" title="copy2.PNG" alt="copy2.PNG" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Select all of the columns, including the first column that already has the formula, and then from the red triangle in the columns panel, select, Standardize Attributes&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="copy3.PNG" style="width: 641px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/23681iF730D5A1B159D1D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="copy3.PNG" alt="copy3.PNG" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;In the Standardize Attributes dialog window, click on the down arrow for Column Properties and select Formula.&lt;/LI&gt;
&lt;LI&gt;In the expanded window, with the Formula information in it, select the Check Box, "Substitute Column Reference" &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="copy4.PNG" style="width: 548px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/23679i017A32E1F991CD3D/image-size/large?v=v2&amp;amp;px=999" role="button" title="copy4.PNG" alt="copy4.PNG" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Click on OK and the new Formulas will be created&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="copy5.PNG" style="width: 653px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/23680i3AC6C15A07E501BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="copy5.PNG" alt="copy5.PNG" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 04 May 2020 10:32:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/264004#M51509</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-05-04T10:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Apply same formula to several columns</title>
      <link>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/264024#M51513</link>
      <description>&lt;P&gt;Select all the original data columns. Right-click on the name of one of them and select &lt;STRONG&gt;New Formula Column &amp;gt; Transform &amp;gt; Log.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 12:51:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Apply-same-formula-to-several-columns/m-p/264024#M51513</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-05-04T12:51:37Z</dc:date>
    </item>
  </channel>
</rss>

