<?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 use a value to find the correct column to use in a formula in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/548107#M76506</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a summary table where I'd like to create a new column 'Rate' with a formula. The column MAXRESULT gives the name of the column I want to use in the formula. unfortunately,&amp;nbsp;I'm getting 'missing arguments' error when I create the formula based on column name.&lt;/P&gt;&lt;P&gt;Column 'Rate' formula:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(100 * Column Name( Parse( "N(" || Char( :MAXRESULT ) || ")" ) )[]) / :N Rows&lt;/CODE&gt;&lt;/PRE&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="cyrilmichelland_0-1663851353607.png" style="width: 768px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/45691i38D140025C72C69E/image-dimensions/768x131?v=v2" width="768" height="131" role="button" title="cyrilmichelland_0-1663851353607.png" alt="cyrilmichelland_0-1663851353607.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's wrong ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 15:58:51 GMT</pubDate>
    <dc:creator>cyrilmichelland</dc:creator>
    <dc:date>2023-06-09T15:58:51Z</dc:date>
    <item>
      <title>use a value to find the correct column to use in a formula</title>
      <link>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/548107#M76506</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a summary table where I'd like to create a new column 'Rate' with a formula. The column MAXRESULT gives the name of the column I want to use in the formula. unfortunately,&amp;nbsp;I'm getting 'missing arguments' error when I create the formula based on column name.&lt;/P&gt;&lt;P&gt;Column 'Rate' formula:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(100 * Column Name( Parse( "N(" || Char( :MAXRESULT ) || ")" ) )[]) / :N Rows&lt;/CODE&gt;&lt;/PRE&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="cyrilmichelland_0-1663851353607.png" style="width: 768px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/45691i38D140025C72C69E/image-dimensions/768x131?v=v2" width="768" height="131" role="button" title="cyrilmichelland_0-1663851353607.png" alt="cyrilmichelland_0-1663851353607.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's wrong ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:58:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/548107#M76506</guid>
      <dc:creator>cyrilmichelland</dc:creator>
      <dc:date>2023-06-09T15:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: use a value to find the correct column to use in a formula</title>
      <link>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/548174#M76508</link>
      <description>&lt;P&gt;One option is to use As Column() or Column() instead of Column Name() (with As Column() you shouldn't need []). Also there should be no need to use Parse().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(100 * As Column("N(" || Char(:MAXRESULT) || ")")) / :N Rows&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Sep 2022 15:13:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/548174#M76508</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-09-22T15:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: use a value to find the correct column to use in a formula</title>
      <link>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/549707#M76613</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the proposed formula still doesn't work :(&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cyrilmichelland_0-1664270697287.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/45817iA23FDBD4433F73B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cyrilmichelland_0-1664270697287.png" alt="cyrilmichelland_0-1664270697287.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Error unresolved column&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="cyrilmichelland_1-1664270764725.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/45818iD32521E011BDFE2F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cyrilmichelland_1-1664270764725.png" alt="cyrilmichelland_1-1664270764725.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Error Could not find column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;anything else I can try out ?&lt;/P&gt;&lt;P&gt;Thanks for your support&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 09:27:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/549707#M76613</guid>
      <dc:creator>cyrilmichelland</dc:creator>
      <dc:date>2022-09-27T09:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: use a value to find the correct column to use in a formula</title>
      <link>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/549723#M76616</link>
      <description>&lt;P&gt;Here is an example that shows that&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;column does work.&amp;nbsp; I believe that you have an issue with your data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Table( "Untitled 12",
	Add Rows( 4 ),
	New Column( "N(1.6)",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [445, 446, 0, 0] )
	),
	New Column( "N(1.5)",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [0, 0, 441, 446] )
	),
	New Column( "MAXRESULT",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1.6, 1.6, 1.5, 1.5] )
	),
	New Column( "N Rows",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [446, 446, 446, 446] )
	),
	New Column( "Rate",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( (100 * As Column( "N(" || Char( :MAXRESULT ) || ")" )) / :N Rows ),
		Set Selected
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Sep 2022 11:22:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/549723#M76616</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-09-27T11:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: use a value to find the correct column to use in a formula</title>
      <link>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/549799#M76619</link>
      <description>&lt;P&gt;ok it's working on my data set as well.&lt;/P&gt;&lt;P&gt;the strange thing is it's still showing the error in the preview but then when I apply the formula, the result is good.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all !&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 13:54:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/549799#M76619</guid>
      <dc:creator>cyrilmichelland</dc:creator>
      <dc:date>2022-09-27T13:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: use a value to find the correct column to use in a formula</title>
      <link>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/549813#M76620</link>
      <description>&lt;P&gt;Formula editor doesn't like the formula. There are quite a few formulas which can have those red-underlines but they will still work (using Current Data Table() for example). In this case I think it is caused by not evaluation the column names into the formula&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 14:16:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/use-a-value-to-find-the-correct-column-to-use-in-a-formula/m-p/549813#M76620</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-09-27T14:16:00Z</dc:date>
    </item>
  </channel>
</rss>

