<?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 Value Ordering of a column based in Ascending Date for another column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Value-Ordering-of-a-column-based-in-Ascending-Date-for-another/m-p/68903#M34959</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know if there is a way to assign the value ordering labels of one column based in another column that would have a date sorted ascending via scripting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a little example of the columns. I want to have my ID's order by date.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;71220G1&lt;/TD&gt;&lt;TD&gt;01/04/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;80102G1&lt;/TD&gt;&lt;TD&gt;01/05/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;80209G1&lt;/TD&gt;&lt;TD&gt;02/19/2018&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need that beacuse I need to do a graphic in Control Chart Builder by ID, but&amp;nbsp;to see the&amp;nbsp;trend in time also. I know if build a XBar chart by itself it would accomodate my values as they appear in the data table, but Control Chart Builder won't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is a big data table so any jsl code for doing this would be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&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;</description>
    <pubDate>Mon, 20 Aug 2018 16:21:47 GMT</pubDate>
    <dc:creator>nicoleaba</dc:creator>
    <dc:date>2018-08-20T16:21:47Z</dc:date>
    <item>
      <title>Value Ordering of a column based in Ascending Date for another column</title>
      <link>https://community.jmp.com/t5/Discussions/Value-Ordering-of-a-column-based-in-Ascending-Date-for-another/m-p/68903#M34959</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know if there is a way to assign the value ordering labels of one column based in another column that would have a date sorted ascending via scripting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a little example of the columns. I want to have my ID's order by date.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;71220G1&lt;/TD&gt;&lt;TD&gt;01/04/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;80102G1&lt;/TD&gt;&lt;TD&gt;01/05/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;80209G1&lt;/TD&gt;&lt;TD&gt;02/19/2018&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need that beacuse I need to do a graphic in Control Chart Builder by ID, but&amp;nbsp;to see the&amp;nbsp;trend in time also. I know if build a XBar chart by itself it would accomodate my values as they appear in the data table, but Control Chart Builder won't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is a big data table so any jsl code for doing this would be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&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;</description>
      <pubDate>Mon, 20 Aug 2018 16:21:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Value-Ordering-of-a-column-based-in-Ascending-Date-for-another/m-p/68903#M34959</guid>
      <dc:creator>nicoleaba</dc:creator>
      <dc:date>2018-08-20T16:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Value Ordering of a column based in Ascending Date for another column</title>
      <link>https://community.jmp.com/t5/Discussions/Value-Ordering-of-a-column-based-in-Ascending-Date-for-another/m-p/68905#M34960</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/12576"&gt;@nicoleaba&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Sorting the table by dates could work. So something like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table(); 

dt1 = dt &amp;lt;&amp;lt; Sort( By( :Date ), Order( Ascending ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Aug 2018 16:32:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Value-Ordering-of-a-column-based-in-Ascending-Date-for-another/m-p/68905#M34960</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2018-08-20T16:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Value Ordering of a column based in Ascending Date for another column</title>
      <link>https://community.jmp.com/t5/Discussions/Value-Ordering-of-a-column-based-in-Ascending-Date-for-another/m-p/68914#M34961</link>
      <description>&lt;P&gt;This code will work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "Test", Add Rows( 3 ), 
		New Column( "ID", Character, "Nominal",
		Set Values( {"71220G1", "80102G1", "80209G1"} )
	),
	New Column( "Date", Numeric, "Continuous", Format( "m/d/y", 12 ),
		Input Format( "m/d/y" ),
		Set Values( [3597868800, 3597955200, 3601843200] )
	)
);
dt &amp;lt;&amp;lt; sort(replace table(1), by(:Date));
id_values = dt:ID &amp;lt;&amp;lt; get values;
dt:id &amp;lt;&amp;lt; Set Property( "Value Ordering", id_values );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you have multiple dates for a given ID you'll have to take a different approach.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 17:07:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Value-Ordering-of-a-column-based-in-Ascending-Date-for-another/m-p/68914#M34961</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2018-08-20T17:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Value Ordering of a column based in Ascending Date for another column</title>
      <link>https://community.jmp.com/t5/Discussions/Value-Ordering-of-a-column-based-in-Ascending-Date-for-another/m-p/68973#M34965</link>
      <description>&lt;P&gt;It worked perfectly!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4550"&gt;@pmroz&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 22:13:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Value-Ordering-of-a-column-based-in-Ascending-Date-for-another/m-p/68973#M34965</guid>
      <dc:creator>nicoleaba</dc:creator>
      <dc:date>2018-08-20T22:13:37Z</dc:date>
    </item>
  </channel>
</rss>

