<?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: Summary Table Script Help in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Summary-Table-Script-Help/m-p/46683#M26599</link>
    <description>&lt;P&gt;When copying the table script&amp;nbsp;for a summary table you actually&amp;nbsp;want to&amp;nbsp;copy the 'source' script that is automatically&amp;nbsp;attached to the new data table. That script is usually pretty short and does not have New&amp;nbsp;Column syntax in it (if&amp;nbsp;you added new columns after the&amp;nbsp;table was created you would first run the source script and then add the new columns). Try opening your data table and running this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = current data table();

//Summary Table
dtSum = dt &amp;lt;&amp;lt; Summary(
	Group( :Month Year ),
	Sum( :Count ),
	Subgroup( :Recordable ),
	Freq( "None" ),
	Weight( "None" ),
	output table name( "Sum of Count by Month" )
);

//Chart
dtSum &amp;lt;&amp;lt; Control Chart(
	Sample Label( :Month Year ),
	Sample Size( 250 ),
	KSigma( 3 ),
	Chart Col( :Name( "Sum(Count, Near Miss)" ), C ),
	Chart Col( :Name( "Sum(Count, Non-Record)" ), C ),
	Chart Col( :Name( "Sum(Count, Recordable)" ), C ),
	SendToReport(
		Dispatch(
			{"C of Sum(Count, Near Miss)"},
			"Attributes Chart",
			FrameBox( 2 ),
			{Frame Size( 64, 208 )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 02 Nov 2017 02:40:35 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2017-11-02T02:40:35Z</dc:date>
    <item>
      <title>Summary Table Script Help</title>
      <link>https://community.jmp.com/t5/Discussions/Summary-Table-Script-Help/m-p/46647#M26579</link>
      <description>&lt;P&gt;I’m hoping someone can help me debug some script. I’m working out of a base data table that has a row for every injury since 2016. I want to construct a C chart for our safety coordinator so that he can better analyze our injury trends. When I try to create this chart in the base data table, I get multiple values along the X axis that represent the same month. Because of this, every data point shows up as a 1 on the control chart. To overcome this issue, I created a summary table of the sum of the column “Count” grouped by “Month / Year” and sub grouped by the column “Recordable.”&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I create this table the C chart looks correct because there is only 1 row per month and a summary statistic for each type of injury. My issue is that I would really like to not have to go through this process every time I want to look at updated data. So I saved the script from my summary table and pasted it to the base table so that theoretically I should only have to click one button and viola, there is my summary table with the saved C charts. The issue is however that the column “Month / Year” in the base table is a formulated column that uses the column “Date” in the base table. For some reason when I run the script, JMP doesn’t know to reference the “Date” column correctly to write the formula for “Month / Year” resulting in blank values for that column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m pretty new to writing script so anything you can do to offer some support would be extremely helpful. Oh and if there is a way to show the C charts on the base table that would then allow me to skip the summary table all together please let me know.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 16:50:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summary-Table-Script-Help/m-p/46647#M26579</guid>
      <dc:creator>mmeewes</dc:creator>
      <dc:date>2017-11-01T16:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Table Script Help</title>
      <link>https://community.jmp.com/t5/Discussions/Summary-Table-Script-Help/m-p/46682#M26598</link>
      <description>&lt;P&gt;When copying the table script&amp;nbsp;for a summary table you actually&amp;nbsp;want to&amp;nbsp;copy the 'source' script that is automatically&amp;nbsp;attached to the new data table. That script is usually pretty short and does not have New&amp;nbsp;Column syntax in it (if&amp;nbsp;you added new columns after the tabe was created you would first run the source script and then add the new columns). Try opening your data table and running this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = current data table();

//Summary Table
dtSum = dt &amp;lt;&amp;lt; Summary(
	Group( :Month Year ),
	Sum( :Count ),
	Subgroup( :Recordable ),
	Freq( "None" ),
	Weight( "None" ),
	output table name( "Sum of Count by Month" )
);

//Chart
dtSum &amp;lt;&amp;lt; Control Chart(
	Sample Label( :Month Year ),
	Sample Size( 250 ),
	KSigma( 3 ),
	Chart Col( :Name( "Sum(Count, Near Miss)" ), C ),
	Chart Col( :Name( "Sum(Count, Non-Record)" ), C ),
	Chart Col( :Name( "Sum(Count, Recordable)" ), C ),
	SendToReport(
		Dispatch(
			{"C of Sum(Count, Near Miss)"},
			"Attributes Chart",
			FrameBox( 2 ),
			{Frame Size( 64, 208 )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Nov 2017 02:39:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summary-Table-Script-Help/m-p/46682#M26598</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2017-11-02T02:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Table Script Help</title>
      <link>https://community.jmp.com/t5/Discussions/Summary-Table-Script-Help/m-p/46683#M26599</link>
      <description>&lt;P&gt;When copying the table script&amp;nbsp;for a summary table you actually&amp;nbsp;want to&amp;nbsp;copy the 'source' script that is automatically&amp;nbsp;attached to the new data table. That script is usually pretty short and does not have New&amp;nbsp;Column syntax in it (if&amp;nbsp;you added new columns after the&amp;nbsp;table was created you would first run the source script and then add the new columns). Try opening your data table and running this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = current data table();

//Summary Table
dtSum = dt &amp;lt;&amp;lt; Summary(
	Group( :Month Year ),
	Sum( :Count ),
	Subgroup( :Recordable ),
	Freq( "None" ),
	Weight( "None" ),
	output table name( "Sum of Count by Month" )
);

//Chart
dtSum &amp;lt;&amp;lt; Control Chart(
	Sample Label( :Month Year ),
	Sample Size( 250 ),
	KSigma( 3 ),
	Chart Col( :Name( "Sum(Count, Near Miss)" ), C ),
	Chart Col( :Name( "Sum(Count, Non-Record)" ), C ),
	Chart Col( :Name( "Sum(Count, Recordable)" ), C ),
	SendToReport(
		Dispatch(
			{"C of Sum(Count, Near Miss)"},
			"Attributes Chart",
			FrameBox( 2 ),
			{Frame Size( 64, 208 )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Nov 2017 02:40:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summary-Table-Script-Help/m-p/46683#M26599</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2017-11-02T02:40:35Z</dc:date>
    </item>
  </channel>
</rss>

