<?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: applying formula to 2400 columns, but that each references a previous column's values? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/applying-formula-to-2400-columns-but-that-each-references-a/m-p/413306#M66298</link>
    <description>&lt;P&gt;There are other ways to do this, but check out the recently-posted&amp;nbsp;&lt;LI-MESSAGE title="Scripting Tools" uid="410943" url="https://community.jmp.com/t5/JMP-Add-Ins/Scripting-Tools/m-p/410943#U410943" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;Add-in, if I understand your request correctly you can select all of the columns you are interested in (start with a couple to make sure it works as expected) and enter this in the formula section:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Abs(
	Col Sum(
		(&amp;lt;column&amp;gt; / Col Sum( &amp;lt;column&amp;gt; )) *
		Ln( &amp;lt;column&amp;gt; / Col Sum( &amp;lt;column&amp;gt; ) )
	)
) / Ln( Col Number( &amp;lt;column&amp;gt; ) )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ih_0-1630093273431.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35348i06CD4F839FCDA5B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ih_0-1630093273431.png" alt="ih_0-1630093273431.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Aug 2021 19:42:10 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2021-08-27T19:42:10Z</dc:date>
    <item>
      <title>applying formula to 2400 columns, but that each references a previous column's values?</title>
      <link>https://community.jmp.com/t5/Discussions/applying-formula-to-2400-columns-but-that-each-references-a/m-p/413272#M66297</link>
      <description>&lt;P&gt;I have a table of 2400 columns and 311 rows. Each column has values and no formula. However, I have a single formula I want to use on each column that references that column's values. For example, for column "80" I have next to it another column with this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Abs(
	Col Sum(
		(:Name( "80" ) / Col Sum( :Name( "80" ) )) *
		Ln( :Name( "80" ) / Col Sum( :Name( "80" ) ) )
	)
) / Ln( Col Number( :Name( "80" ) ) )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Ideally, I'd like a new table of columns that results from using this formula on each of the previous table's columns values. I can go through manually and type in the "80" after pasting each formula to a newly created column next to the original on the first table, but there must be a quicker way to do this? If not a completely new table, then can I somehow create a "lag" that simply references the column before to get the values rather than specifying a unique column name (e.g., "80") each time? But the first way would be preferable. Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:36:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/applying-formula-to-2400-columns-but-that-each-references-a/m-p/413272#M66297</guid>
      <dc:creator>fever</dc:creator>
      <dc:date>2023-06-10T23:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: applying formula to 2400 columns, but that each references a previous column's values?</title>
      <link>https://community.jmp.com/t5/Discussions/applying-formula-to-2400-columns-but-that-each-references-a/m-p/413306#M66298</link>
      <description>&lt;P&gt;There are other ways to do this, but check out the recently-posted&amp;nbsp;&lt;LI-MESSAGE title="Scripting Tools" uid="410943" url="https://community.jmp.com/t5/JMP-Add-Ins/Scripting-Tools/m-p/410943#U410943" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;Add-in, if I understand your request correctly you can select all of the columns you are interested in (start with a couple to make sure it works as expected) and enter this in the formula section:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Abs(
	Col Sum(
		(&amp;lt;column&amp;gt; / Col Sum( &amp;lt;column&amp;gt; )) *
		Ln( &amp;lt;column&amp;gt; / Col Sum( &amp;lt;column&amp;gt; ) )
	)
) / Ln( Col Number( &amp;lt;column&amp;gt; ) )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ih_0-1630093273431.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35348i06CD4F839FCDA5B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ih_0-1630093273431.png" alt="ih_0-1630093273431.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 19:42:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/applying-formula-to-2400-columns-but-that-each-references-a/m-p/413306#M66298</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-08-27T19:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: applying formula to 2400 columns, but that each references a previous column's values?</title>
      <link>https://community.jmp.com/t5/Discussions/applying-formula-to-2400-columns-but-that-each-references-a/m-p/413410#M66306</link>
      <description>&lt;P&gt;This works perfectly. Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Aug 2021 15:42:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/applying-formula-to-2400-columns-but-that-each-references-a/m-p/413410#M66306</guid>
      <dc:creator>fever</dc:creator>
      <dc:date>2021-08-28T15:42:59Z</dc:date>
    </item>
  </channel>
</rss>

