<?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: combine actions/scripts in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78116#M36344</link>
    <description>&lt;P&gt;Try Summarize().&amp;nbsp; Also, you can add an "Invisible" parameter to the Tabulate Platform, so you never see the actual display....&lt;/P&gt;</description>
    <pubDate>Sat, 06 Oct 2018 00:18:00 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-10-06T00:18:00Z</dc:date>
    <item>
      <title>combine actions/scripts</title>
      <link>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78107#M36339</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to do a tabulate, make into data table, and then add calculated metric based on the data table. Below is what I have now (copying script of each action). I'm not sure how to combine the action of data table and the new metric. Please help, thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table(
			Analysis Columns(
				:Name( "201733 Weekly COMP Store Sales" ),
				:Name( "201833 Weekly COMP Store Sales" )
			)
		),
		Row Table(
			Grouping Columns( :Name( "18 IRI Market" ) ),
			Add Aggregate Statistics( :Name( "18 IRI Market" ) )
		)
	)
);
 
dt &amp;lt;&amp;lt; makeintodatatable;
 
 
dt &amp;lt;&amp;lt; New Column( "ratio",
	Numeric,
	"Continuous",
	Format( "Best", 12 ),
	Formula( :Name( "Sum(201833 Weekly COMP Store Sales)" ) / :Name( "Sum(201733 Weekly COMP Store Sales)" ) ),
	Set Selected
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Oct 2018 21:03:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78107#M36339</guid>
      <dc:creator>joann</dc:creator>
      <dc:date>2018-10-05T21:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: combine actions/scripts</title>
      <link>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78109#M36341</link>
      <description>&lt;P&gt;See my comments in my changes to your script below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = current data table();

// dt normally is a reference to a data table, as I have referenced
// in the statement above.  The variable "tab", below, will refer to the
// tabulate platform 
tab = dt &amp;lt;&amp;lt; Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table(
			Analysis Columns(
				:Name( "201733 Weekly COMP Store Sales" ),
				:Name( "201833 Weekly COMP Store Sales" )
			)
		),
		Row Table(
			Grouping Columns( :Name( "18 IRI Market" ) ),
			Add Aggregate Statistics( :Name( "18 IRI Market" ) )
		)
	)
);

// the dt2 variable will point to the new output data table
dt2 = tab &amp;lt;&amp;lt; makeintodatatable; 
 
// I am a little confused as to what data table you really want to 
// add the new column to......I am changing the dt data tablereference 
// to dt2, it is in the output data table that thes columns exist
dt2 &amp;lt;&amp;lt; New Column( "ratio",
	Numeric,
	"Continuous",
	Format( "Best", 12 ),
	Formula(
		:Name( "Sum(201833 Weekly COMP Store Sales)" ) /
		:Name( "Sum(201733 Weekly COMP Store Sales)" )
	),
	Set Selected
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Oct 2018 21:09:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78109#M36341</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-10-05T21:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: combine actions/scripts</title>
      <link>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78110#M36342</link>
      <description>Thank you so much Jim!&lt;BR /&gt;Yes this is exactly what I need. Adding calculated metric on top of the new data table generated by tabulate. Thanks a lot!</description>
      <pubDate>Fri, 05 Oct 2018 21:49:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78110#M36342</guid>
      <dc:creator>joann</dc:creator>
      <dc:date>2018-10-05T21:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: combine actions/scripts</title>
      <link>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78111#M36343</link>
      <description>Quick question: is there a Groupby function in JSL (like in python) to replace the tabulate function?&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Oct 2018 22:08:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78111#M36343</guid>
      <dc:creator>joann</dc:creator>
      <dc:date>2018-10-05T22:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: combine actions/scripts</title>
      <link>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78116#M36344</link>
      <description>&lt;P&gt;Try Summarize().&amp;nbsp; Also, you can add an "Invisible" parameter to the Tabulate Platform, so you never see the actual display....&lt;/P&gt;</description>
      <pubDate>Sat, 06 Oct 2018 00:18:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/combine-actions-scripts/m-p/78116#M36344</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-10-06T00:18:00Z</dc:date>
    </item>
  </channel>
</rss>

