<?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 Tabulate Page Column item specified from for loop in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Tabulate-Page-Column-item-specified-from-for-loop/m-p/899648#M105956</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to tabulate multi cases based on a specific column value in for loop.&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;categorizes = Column(dt, "Categorize");
columnValues = Associative Array(categorizes &amp;lt;&amp;lt; Get Values) &amp;lt;&amp;lt; Get Keys;
For(i = 1, i &amp;lt;= N Items(columnValues), i++,
	currentItem = columnValues[i];
 
 
	obLoopY = Outline Box("categorize" || Char(currentItem),
		dt &amp;lt;&amp;lt; Tabulate(
			Page Column(:Categorize(Char(currentItem))),
			Show Control Panel(0),
			Add Table(
				Column Table(
					Grouping Columns(:Underlayer, :RefEntity),
					Analysis Columns(:M3S_Y)
				),
				Row Table(Grouping Columns(:TargetEntity))
			),
			SendToReport(Dispatch({}, "", TextBox, {Set Base Font("Heading")}))
		)
	);
 
	boxY &amp;lt;&amp;lt; append(obLoopY);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Problem is, the currentItem contains the columnValues from Categorize column.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;If I just specify the item value, let's say "a" as one of columnValues.&lt;/DIV&gt;
&lt;DIV&gt;I added&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Page Column( :Categorize( "a" ) )&lt;/STRONG&gt;&lt;/EM&gt; into Tabulate method, then it works.&lt;/DIV&gt;
&lt;DIV&gt;But I needed to run all values from for loop, I tried to make it&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Page Column( :Categorize( currentItem ) ), &lt;/STRONG&gt;&lt;/EM&gt;but it did not work and just gave me the whole value at once instead of splitting by currentItem.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I tried&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Page Column( :Categorize( currentItem ) ),&amp;nbsp;Page Column( :Categorize( char(currentItem) ) ), &lt;/STRONG&gt;&lt;/EM&gt;but neither of them worked. Probably there is a very easy solution but I could not find it.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Anyone can help?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks in advance&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Edit (jthi): Added jsl formatting&lt;/DIV&gt;</description>
    <pubDate>Wed, 10 Sep 2025 18:29:41 GMT</pubDate>
    <dc:creator>DarkWinter</dc:creator>
    <dc:date>2025-09-10T18:29:41Z</dc:date>
    <item>
      <title>Tabulate Page Column item specified from for loop</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-Page-Column-item-specified-from-for-loop/m-p/899648#M105956</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to tabulate multi cases based on a specific column value in for loop.&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;categorizes = Column(dt, "Categorize");
columnValues = Associative Array(categorizes &amp;lt;&amp;lt; Get Values) &amp;lt;&amp;lt; Get Keys;
For(i = 1, i &amp;lt;= N Items(columnValues), i++,
	currentItem = columnValues[i];
 
 
	obLoopY = Outline Box("categorize" || Char(currentItem),
		dt &amp;lt;&amp;lt; Tabulate(
			Page Column(:Categorize(Char(currentItem))),
			Show Control Panel(0),
			Add Table(
				Column Table(
					Grouping Columns(:Underlayer, :RefEntity),
					Analysis Columns(:M3S_Y)
				),
				Row Table(Grouping Columns(:TargetEntity))
			),
			SendToReport(Dispatch({}, "", TextBox, {Set Base Font("Heading")}))
		)
	);
 
	boxY &amp;lt;&amp;lt; append(obLoopY);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Problem is, the currentItem contains the columnValues from Categorize column.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;If I just specify the item value, let's say "a" as one of columnValues.&lt;/DIV&gt;
&lt;DIV&gt;I added&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Page Column( :Categorize( "a" ) )&lt;/STRONG&gt;&lt;/EM&gt; into Tabulate method, then it works.&lt;/DIV&gt;
&lt;DIV&gt;But I needed to run all values from for loop, I tried to make it&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Page Column( :Categorize( currentItem ) ), &lt;/STRONG&gt;&lt;/EM&gt;but it did not work and just gave me the whole value at once instead of splitting by currentItem.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I tried&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Page Column( :Categorize( currentItem ) ),&amp;nbsp;Page Column( :Categorize( char(currentItem) ) ), &lt;/STRONG&gt;&lt;/EM&gt;but neither of them worked. Probably there is a very easy solution but I could not find it.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Anyone can help?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks in advance&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Edit (jthi): Added jsl formatting&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Sep 2025 18:29:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-Page-Column-item-specified-from-for-loop/m-p/899648#M105956</guid>
      <dc:creator>DarkWinter</dc:creator>
      <dc:date>2025-09-10T18:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate Page Column item specified from for loop</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-Page-Column-item-specified-from-for-loop/m-p/899660#M105957</link>
      <description>&lt;P&gt;You might have to evaluate the values, below is an example using JMP's sample table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
Summarize(dt, groups = By(:sex));

New Window("test", 
	collector = H List Box()
);

For Each({group}, groups,
	ob = Outline Box("Categorize " || group,
		tab = dt &amp;lt;&amp;lt; Tabulate(
			Show Control Panel(0),
			Add Table(
				Column Table(Analysis Columns(:height, :weight), Statistics(Mean)),
				Row Table(Grouping Columns(:age))
			)
		);
		Eval(EvalExpr(
			tab &amp;lt;&amp;lt; page column(:sex(Expr(group)));
		));
	);
	collector &amp;lt;&amp;lt; Append(ob);
);

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1757529291969.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82255i339DE59DD890E101/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1757529291969.png" alt="jthi_0-1757529291969.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the layout is fine, By might also be an option&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

tab = dt &amp;lt;&amp;lt; Tabulate(
	Show Control Panel(0),
	Add Table(
		Column Table(Analysis Columns(:height, :weight), Statistics(Mean)),
		Row Table(Grouping Columns(:age))
	),
	By(:sex),
	Group Options(Layout("Horizontal List"))
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1757529379300.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/82256i7C6E0F2AABE63CE5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1757529379300.png" alt="jthi_1-1757529379300.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 18:36:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-Page-Column-item-specified-from-for-loop/m-p/899660#M105957</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-09-10T18:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate Page Column item specified from for loop</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-Page-Column-item-specified-from-for-loop/m-p/899661#M105958</link>
      <description>&lt;P&gt;Thanks using By also removes unnecessary for loop!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 18:40:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-Page-Column-item-specified-from-for-loop/m-p/899661#M105958</guid>
      <dc:creator>DarkWinter</dc:creator>
      <dc:date>2025-09-10T18:40:25Z</dc:date>
    </item>
  </channel>
</rss>

