<?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 Script to highlight a cell in a report in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Script-to-highlight-a-cell-in-a-report/m-p/818279#M99686</link>
    <description>&lt;P&gt;hello everyone....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am performing contingency reports across a number of categorical X's towards a given Y (categorical) - where I like to highlight contingency table cells (from output report) based on conditions :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e.g. highlight if&amp;nbsp;&lt;/P&gt;
&lt;P&gt;count &amp;gt;=12&lt;/P&gt;
&lt;P&gt;Cell Chi Square &amp;gt;=3.0&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would like to highlight the cell w/ some color (font color can also work, highlight is better) if it satisfies the given condition&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additional request: Is there a way to either sort the rows based on eg. decreasing Cell Chi Square -- however as the rows contain multiple row elements (in my setup,&amp;nbsp; I use 3 : Count, Row % and Cell Chi Square) they would all need to be part of the sorting&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to filter only rows that satisfy a given condition ? (ie these can be the highlighted ones)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Here is a sample script targeting your sample data (Aircraft Incidents.jmp)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Contingency(
	Y(:Fatal),
	X(:Model),
	Contingency Table(
		Count(1, Format("Fixed Dec", 8, 0)),
		Total %(0, Format("Fixed Dec", 8, 2)),
		Col %(0, Format("Fixed Dec", 8, 2)),
		Row %(1, Format("Fixed Dec", 8, 2)),
		Expected(0, Format("Best", 8)),
		Deviation(0, Format("Best", 8)),
		Cell Chi Square(1, Format("Fixed Dec", 8, 4)),
		Col cumulative(0, Format("Fixed Dec", 8, 0)),
		Col cumulative %(0, Format("Fixed Dec", 8, 2)),
		Row cumulative(0, Format("Fixed Dec", 8, 0)),
		Row cumulative %(0, Format("Fixed Dec", 8, 2))
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thx&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Altug Bayram&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Nov 2024 16:40:57 GMT</pubDate>
    <dc:creator>altug_bayram</dc:creator>
    <dc:date>2024-11-22T16:40:57Z</dc:date>
    <item>
      <title>Script to highlight a cell in a report</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-highlight-a-cell-in-a-report/m-p/818279#M99686</link>
      <description>&lt;P&gt;hello everyone....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am performing contingency reports across a number of categorical X's towards a given Y (categorical) - where I like to highlight contingency table cells (from output report) based on conditions :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e.g. highlight if&amp;nbsp;&lt;/P&gt;
&lt;P&gt;count &amp;gt;=12&lt;/P&gt;
&lt;P&gt;Cell Chi Square &amp;gt;=3.0&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would like to highlight the cell w/ some color (font color can also work, highlight is better) if it satisfies the given condition&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additional request: Is there a way to either sort the rows based on eg. decreasing Cell Chi Square -- however as the rows contain multiple row elements (in my setup,&amp;nbsp; I use 3 : Count, Row % and Cell Chi Square) they would all need to be part of the sorting&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to filter only rows that satisfy a given condition ? (ie these can be the highlighted ones)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Here is a sample script targeting your sample data (Aircraft Incidents.jmp)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Contingency(
	Y(:Fatal),
	X(:Model),
	Contingency Table(
		Count(1, Format("Fixed Dec", 8, 0)),
		Total %(0, Format("Fixed Dec", 8, 2)),
		Col %(0, Format("Fixed Dec", 8, 2)),
		Row %(1, Format("Fixed Dec", 8, 2)),
		Expected(0, Format("Best", 8)),
		Deviation(0, Format("Best", 8)),
		Cell Chi Square(1, Format("Fixed Dec", 8, 4)),
		Col cumulative(0, Format("Fixed Dec", 8, 0)),
		Col cumulative %(0, Format("Fixed Dec", 8, 2)),
		Row cumulative(0, Format("Fixed Dec", 8, 0)),
		Row cumulative %(0, Format("Fixed Dec", 8, 2))
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thx&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Altug Bayram&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2024 16:40:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-highlight-a-cell-in-a-report/m-p/818279#M99686</guid>
      <dc:creator>altug_bayram</dc:creator>
      <dc:date>2024-11-22T16:40:57Z</dc:date>
    </item>
  </channel>
</rss>

