<?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: Barchart to show count of unique values in a column by another categorical column - JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106930#M39076</link>
    <description>&lt;P&gt;Hello Darkhorse,&lt;/P&gt;
&lt;P&gt;Please check out the graph below.&amp;nbsp; This was built in Graph Builder with a couple of drags and a click or something like that.&amp;nbsp; Since you are newer to JMP I am guessing you have not used Graph Builder.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="CaptureGB.JPG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15150i9E52DC510CD25033/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CaptureGB.JPG" alt="CaptureGB.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jan 2019 18:49:13 GMT</pubDate>
    <dc:creator>Bill_Worley</dc:creator>
    <dc:date>2019-01-17T18:49:13Z</dc:date>
    <item>
      <title>Barchart to show count of unique values in a column by another categorical column - JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106697#M39047</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a newbie here. I was trying to build a barchart where the X- axis (bar categories) is a categorical column in my table and Y-axis (bar height) is the count of unique values in another column. Code for troubleshooting:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Make data table
t = New Table( "test", Add Rows( 5 ),
New Column( "Customer", Character, "Nominal",
Set Values( {"A", "A", "B", "B", "B", "C", "D", "E","E"} ) ),
New Column( "OrderID", Character, "Nominal",
Set Values( {"1", "2", "3", "4", "5", "6", "7", "8","9"} ) ),
New Column( "Prime member", Character,"Nominal",
Set Values( {"Non-Prime", "Non-Prime", "Prime", "Prime", "Prime", "Non-Prime", "Non-Prime", "Prime","Prime"} ) ),
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please see the screenshots for what I'm looking for. &lt;U&gt;&lt;STRONG&gt;My data table&lt;/STRONG&gt;&lt;/U&gt;:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 262px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15137i74586245C2EC78B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;What I want:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 406px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15138i85EDE434CF1198A6/image-dimensions/406x378?v=v2" width="406" height="378" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 22:38:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106697#M39047</guid>
      <dc:creator>DarkHorse</dc:creator>
      <dc:date>2019-01-16T22:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart to show count of unique values in a column by another categorical column - JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106711#M39052</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot think of a method to produce the desired bar chart directly from your data table but, the Summary feature will produce a new data table with the correct numbers: Statistics&amp;nbsp;= N Categories (CUSTOMER) and GROUP = Membership&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SUMMARIZE PICT.PNG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15139i642AEA330BC80063/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SUMMARIZE PICT.PNG" alt="SUMMARIZE PICT.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 21:20:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106711#M39052</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2019-01-16T21:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart to show count of unique values in a column by another categorical column - JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106925#M39073</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11634"&gt;@Thierry_S&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply! This is helpful.. But not exactly what I wanted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I want to make this chart and attach to the main table itself. Because I will have other charts as well which I want to put together in a dashboard. Thanks agian!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 17:13:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106925#M39073</guid>
      <dc:creator>DarkHorse</dc:creator>
      <dc:date>2019-01-17T17:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart to show count of unique values in a column by another categorical column - JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106930#M39076</link>
      <description>&lt;P&gt;Hello Darkhorse,&lt;/P&gt;
&lt;P&gt;Please check out the graph below.&amp;nbsp; This was built in Graph Builder with a couple of drags and a click or something like that.&amp;nbsp; Since you are newer to JMP I am guessing you have not used Graph Builder.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="CaptureGB.JPG" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15150i9E52DC510CD25033/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CaptureGB.JPG" alt="CaptureGB.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 18:49:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106930#M39076</guid>
      <dc:creator>Bill_Worley</dc:creator>
      <dc:date>2019-01-17T18:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart to show count of unique values in a column by another categorical column - JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106998#M39078</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4767"&gt;@Bill_Worley&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for&amp;nbsp;your reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking to report the unique count of customers by prime membership. So, the count on PRIME would be 2 and NON PRIME would be 3 as in the below chart. I guess there should be some grouping by customer and summarize before doing this chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 529px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15151i993F33BA4AE7895F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 20:52:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/106998#M39078</guid>
      <dc:creator>DarkHorse</dc:creator>
      <dc:date>2019-01-17T20:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart to show count of unique values in a column by another categorical column - JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/107014#M39083</link>
      <description>&lt;P&gt;You hit it with grouping and summarizing.&amp;nbsp; Use Tables &amp;gt; Summary and place Prime Member and Customer into Group.&amp;nbsp; This will give you a new table and you can make your chart from there.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 02:43:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/107014#M39083</guid>
      <dc:creator>Bill_Worley</dc:creator>
      <dc:date>2019-01-18T02:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart to show count of unique values in a column by another categorical column - JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/107018#M39084</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/13700"&gt;@DarkHorse&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I think you might be able to do what you want as follows--&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Drag Prime member column to x-axis.&lt;/LI&gt;
&lt;LI&gt;Drag Customer column to overlay role.&lt;/LI&gt;
&lt;LI&gt;Drag Prime member column to color role.&lt;/LI&gt;
&lt;LI&gt;Select the bar element.&lt;/LI&gt;
&lt;LI&gt;Change the bar element property to stacked.&lt;/LI&gt;
&lt;LI&gt;Change the bar element summary statistic to % of total.&lt;/LI&gt;
&lt;LI&gt;Double click the y-axis and chane the format to best from percent.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="bar element property changes" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15155iBD8BF1303AE5C51A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2019-01-17 23.47.13.png" alt="bar element property changes" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;bar element property changes&lt;/span&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="y-axis setting best format" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15153i8EA9525DB0C61698/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2019-01-17 23.33.03.png" alt="y-axis setting best format" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;y-axis setting best format&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Count of Customer by prime membership" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15156i907044E81B05B049/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-01-17 23.47.24.png" alt="Count of Customer by prime membership" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Count of Customer by prime membership&lt;/span&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;is the JSL script to reproduce.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 535, 447 ),
	Show Control Panel( 0 ),
	Variables( X( :Prime member ), Overlay( :Customer ), Color( :Prime member ) ),
	Elements(
		Bar(
			X,
			Legend( 3 ),
			Bar Style( "Stacked" ),
			Summary Statistic( "% of Total" )
		)
	),
	SendToReport(
		Dispatch( {}, "", ScaleBox, {Format( "Best", 9 )} ),
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				3,
				Properties( 0, {Fill Color( 5 )}, Item ID( "Non-Prime", 1 ) ),
				Properties( 1, {Fill Color( 19 )}, Item ID( "Prime", 1 ) ),
				Properties( -1, {Fill Color( 32 )}, Item ID( "A", 1 ) ),
				Properties( -1, {Fill Color( 32 )}, Item ID( "B", 1 ) ),
				Properties( -1, {Fill Color( 32 )}, Item ID( "C", 1 ) ),
				Properties( -1, {Fill Color( 32 )}, Item ID( "D", 1 ) ),
				Properties( -1, {Fill Color( 32 )}, Item ID( "E", 1 ) )
			)}
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;cheers,&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 04:53:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/107018#M39084</guid>
      <dc:creator>stan_koprowski</dc:creator>
      <dc:date>2019-01-18T04:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart to show count of unique values in a column by another categorical column - JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/107069#M39093</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/706"&gt;@stan_koprowski&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Awesome! That worked perfect and exactly what&amp;nbsp;I was looking for. Thanks a ton!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 15:44:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/107069#M39093</guid>
      <dc:creator>DarkHorse</dc:creator>
      <dc:date>2019-01-18T15:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Barchart to show count of unique values in a column by another categorical column - JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/764823#M94426</link>
      <description>&lt;P&gt;VERY (!) nice workaround :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But:&lt;BR /&gt;In most of my cases, the Overlay role is already occupied and this workaround will not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Why is there no "N unique" in this list?&lt;/STRIKE&gt;&lt;BR /&gt;When will there be a "N unique" in this list?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1718171775250.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65099iBC576CFFF7C29F4E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_1-1718171775250.png" alt="hogi_1-1718171775250.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, 12 Jun 2024 05:56:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Barchart-to-show-count-of-unique-values-in-a-column-by-another/m-p/764823#M94426</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-06-12T05:56:21Z</dc:date>
    </item>
  </channel>
</rss>

