<?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 do l use the value from another variable as the first value then add 3.3 for each thereafter in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/221343#M44182</link>
    <description>Thanks very much</description>
    <pubDate>Mon, 12 Aug 2019 02:50:45 GMT</pubDate>
    <dc:creator>Mickyboy</dc:creator>
    <dc:date>2019-08-12T02:50:45Z</dc:date>
    <item>
      <title>how do l use the value from another variable as the first value then add 3.3 for each thereafter</title>
      <link>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/220539#M44086</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Was wondering if anyone can help me with a syntax problem, l wish to use the first value from another variable then increase this value by 3.3, the same as the below,&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;Obs&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;Expected&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;12.3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;12.3&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;15.4&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;15.6&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;18.7&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;18.9&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;22.0&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;22.2&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;25.8&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;25.5&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;28.9&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;28.8&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;32.2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;32.1&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;35.1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri"&gt;35.4&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I have set the values as follows, however I would really like to automate as l have a few to do&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Acc &amp;lt;&amp;lt; New Column( "exp",
	Numeric,
	Continuous,
	Format( "fixed dec", 6, 1 ),
	Set Selected,
    Set Values( [12.3, 15.6, 18.9, 22.2, 25.5, 28.8, 32.1, 35.4] )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks to all&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 01:34:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/220539#M44086</guid>
      <dc:creator>Mickyboy</dc:creator>
      <dc:date>2019-08-08T01:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: how do l use the value from another variable as the first value then add 3.3 for each thereafter</title>
      <link>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/220586#M44090</link>
      <description>&lt;P&gt;You need to take the time to read the documentation on JSL.&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;The way to do this is a very simple formula&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ACC &amp;lt;&amp;lt; New Column( "exp", formula( :Obs +3.3 ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Aug 2019 03:03:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/220586#M44090</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-08-08T03:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: how do l use the value from another variable as the first value then add 3.3 for each thereafter</title>
      <link>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/220588#M44092</link>
      <description>Sorry, l may have confused you, the first value of "exp" equals "obs", then i would like to add 3.3 to the prior value of "exp", so in this case, the first value of "exp" is equal to 12.3, then add 3.3 to this value for the second value of "exp" = 15.6, the third = 18.9, so the first value of "exp" is dependent on "obs" but none of the other values are, your "very simple formula" will not achive this.</description>
      <pubDate>Thu, 08 Aug 2019 04:01:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/220588#M44092</guid>
      <dc:creator>Mickyboy</dc:creator>
      <dc:date>2019-08-08T04:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: how do l use the value from another variable as the first value then add 3.3 for each thereafter</title>
      <link>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/220641#M44094</link>
      <description>&lt;P&gt;Here are a couple of ways to do what you outlined in your last response&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Table( "Example",
	Add Rows( 8 ),
	New Column( "Obs",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [12.3, 15.4, 18.7, 22, 25.8, 28.9, 32.2, 35.1] )
	),
	New Column( "exp1",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula(
			If( Row() == 1,
				start = :Obs,
				start = start + 3.3
			);
			start;
		)
	),
	New Column( "exp2",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( :Obs[1] + (Row() - 1) * 3.3 )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Aug 2019 08:11:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/220641#M44094</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-08-08T08:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: how do l use the value from another variable as the first value then add 3.3 for each thereafter</title>
      <link>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/221179#M44143</link>
      <description>&lt;P&gt;so, this simple formula might work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sounds like you want the result to be lag one cell plus a constant.&lt;/P&gt;
&lt;P&gt;like this?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Lag&lt;/SPAN&gt;(:Expected) + &lt;SPAN&gt;3.3&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 15:03:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/221179#M44143</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2019-08-09T15:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: how do l use the value from another variable as the first value then add 3.3 for each thereafter</title>
      <link>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/221342#M44181</link>
      <description>Thanks so much, worked a treat</description>
      <pubDate>Mon, 12 Aug 2019 02:49:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/221342#M44181</guid>
      <dc:creator>Mickyboy</dc:creator>
      <dc:date>2019-08-12T02:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: how do l use the value from another variable as the first value then add 3.3 for each thereafter</title>
      <link>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/221343#M44182</link>
      <description>Thanks very much</description>
      <pubDate>Mon, 12 Aug 2019 02:50:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-do-l-use-the-value-from-another-variable-as-the-first-value/m-p/221343#M44182</guid>
      <dc:creator>Mickyboy</dc:creator>
      <dc:date>2019-08-12T02:50:45Z</dc:date>
    </item>
  </channel>
</rss>

