<?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: Order level based on last 3 characters of value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409828#M65958</link>
    <description>&lt;P&gt;Both ways are very helpful. Thanks Craige and ZF!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 15 Aug 2021 19:36:19 GMT</pubDate>
    <dc:creator>uProf</dc:creator>
    <dc:date>2021-08-15T19:36:19Z</dc:date>
    <item>
      <title>Order level based on last 3 characters of value</title>
      <link>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409711#M65947</link>
      <description>&lt;P&gt;Hi -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have order of values on x axis in plot to be in ascending order. Issue is these values are alphanumeric strings and only last 3 characters are the ones that indicate order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I would like to see these in following order from left to right on a plot.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1: YRFCA1&lt;/P&gt;&lt;P&gt;2: YRTCB1&lt;/P&gt;&lt;P&gt;3: YRACB2&lt;/P&gt;&lt;P&gt;4: YRTCC0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Row and Value order levels arranged data in a different way.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could do substring of values above and focus only on last 3 characters before ordering them but am not sure how to display entire 6 character string in the plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate input on how I could implement this in JSL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:54:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409711#M65947</guid>
      <dc:creator>uProf</dc:creator>
      <dc:date>2023-06-09T19:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: Order level based on last 3 characters of value</title>
      <link>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409753#M65950</link>
      <description>&lt;P&gt;Maybe something like this. I created the transform column in the GUI, then saved it. Right-click the variable to transform (in the column selector), choose transform-&amp;gt;formula. Then drag/drop the new transform variable into graph builder.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 893, 823 ),
	Show Control Panel( 0 ),
	Variables(
		X( :name ),
		Y(
			Transform Column(
				"Transform[name]",
				Character,
				Nominal,
				Formula(
					Right( :name, 3 ) || "_" || Left( :name, Length( :name ) - 3 )
				)
			)
		)
	),
	Elements( Points( X, Y, Legend( 8 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Last three letters moved to front of name" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35020i7E71A2ABB3B425A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Last three letters moved to front of name" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Last three letters moved to front of name&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 17:47:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409753#M65950</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-08-14T17:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Order level based on last 3 characters of value</title>
      <link>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409775#M65952</link>
      <description>&lt;P&gt;I sort the table by the last 3 character (get the substring of the last 3 char first), then set property of the long text column "value ordering" .&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
dt=New Table( "order by another col",
	Add Rows( 4 ),
	New Column( "Label",
		Character,
		"Nominal",
		Set Values( {"YRFCA1", "YRTCB1", "YRACB2", "YRTCC0", "YAAAA4"} )
	),
	New Column( "Last 3",
		Character,
		"Nominal",
		Formula( Right( :Label, 3 ) ),
),
);
dt &amp;lt;&amp;lt; sort(replace table(1), by(:Last 3));
values=dt:Label &amp;lt;&amp;lt; get values;
dt:Label &amp;lt;&amp;lt; set property ("Value Ordering", values);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="value order.PNG" style="width: 200px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35022i673CC2891CB2930C/image-size/small?v=v2&amp;amp;px=200" role="button" title="value order.PNG" alt="value order.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 19:34:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409775#M65952</guid>
      <dc:creator>ZF</dc:creator>
      <dc:date>2021-08-14T19:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Order level based on last 3 characters of value</title>
      <link>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409777#M65953</link>
      <description>&lt;P&gt;Nice!&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2021 22:04:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409777#M65953</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-08-14T22:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Order level based on last 3 characters of value</title>
      <link>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409828#M65958</link>
      <description>&lt;P&gt;Both ways are very helpful. Thanks Craige and ZF!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Aug 2021 19:36:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409828#M65958</guid>
      <dc:creator>uProf</dc:creator>
      <dc:date>2021-08-15T19:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Order level based on last 3 characters of value</title>
      <link>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409833#M65959</link>
      <description>&lt;P&gt;You can also "force" JMP to use ordering of non-numeric columns through JSL, but this might be a bug and not a feature so might be a bit risky to use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = New Table("table",
	Add Rows(5),
	New Column("Col", Character, "Nominal", Set Values({"YRFCA1", "YRTCB1", "YRACB2", "YRTCC0", "YAAAA4"})),
	New Column("order", Character, "Nominal", Formula(Right(:Col, 3)))
);

dt = Graph Builder(Variables(X(:Col, Order By(:order, Ascending))), Elements(Points(X, Legend(34))));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_3-1629057195639.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35035iBCD97F67CA8E8967/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_3-1629057195639.png" alt="jthi_3-1629057195639.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can do it also directly from Graph builder by using two x-axis label rows:&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="jthi_0-1629056980602.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35032i0A11217295CDD4C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1629056980602.png" alt="jthi_0-1629056980602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then if you want to you canopen x-axis settings and then do some modifications to other label's settings to hide it (in this case order):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1629057085369.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35033iEF61AEA61AD43AC3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1629057085369.png" alt="jthi_1-1629057085369.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and you end up with:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1629057094683.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35034iC13101EA07D3A4E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1629057094683.png" alt="jthi_2-1629057094683.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then you could change the x-axis to remove the order /.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Aug 2021 19:55:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Order-level-based-on-last-3-characters-of-value/m-p/409833#M65959</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-08-15T19:55:35Z</dc:date>
    </item>
  </channel>
</rss>

