<?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 How to join two tables and fill automatically empty rows? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-join-two-tables-and-fill-automatically-empty-rows/m-p/801960#M97790</link>
    <description>&lt;P&gt;Dear.&lt;/P&gt;&lt;P&gt;I am trying to auto-join a table but I failed so fare.&lt;/P&gt;&lt;P&gt;My table shows a date with category which is - in the date - increased by hours.&lt;/P&gt;&lt;P&gt;In addition, it is showing a category - A-B-C-D. This table is called &lt;STRONG&gt;date-category&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I need a table which is showing date and hours and MINUTES increased.&lt;/P&gt;&lt;P&gt;I attached a second table. (&lt;STRONG&gt;date-category-goto&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone join the category to my goto-table? (and put a script?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to extract in the next step my factors and responses from our process control system, and see&lt;/P&gt;&lt;P&gt;which "category" makes the most changes to the process....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes.&lt;/P&gt;&lt;P&gt;Ole&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2024 07:54:44 GMT</pubDate>
    <dc:creator>Ole_Luehn</dc:creator>
    <dc:date>2024-09-26T07:54:44Z</dc:date>
    <item>
      <title>How to join two tables and fill automatically empty rows?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-join-two-tables-and-fill-automatically-empty-rows/m-p/801960#M97790</link>
      <description>&lt;P&gt;Dear.&lt;/P&gt;&lt;P&gt;I am trying to auto-join a table but I failed so fare.&lt;/P&gt;&lt;P&gt;My table shows a date with category which is - in the date - increased by hours.&lt;/P&gt;&lt;P&gt;In addition, it is showing a category - A-B-C-D. This table is called &lt;STRONG&gt;date-category&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I need a table which is showing date and hours and MINUTES increased.&lt;/P&gt;&lt;P&gt;I attached a second table. (&lt;STRONG&gt;date-category-goto&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone join the category to my goto-table? (and put a script?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to extract in the next step my factors and responses from our process control system, and see&lt;/P&gt;&lt;P&gt;which "category" makes the most changes to the process....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wishes.&lt;/P&gt;&lt;P&gt;Ole&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 07:54:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-join-two-tables-and-fill-automatically-empty-rows/m-p/801960#M97790</guid>
      <dc:creator>Ole_Luehn</dc:creator>
      <dc:date>2024-09-26T07:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables and fill automatically empty rows?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-join-two-tables-and-fill-automatically-empty-rows/m-p/801983#M97793</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/16602"&gt;@Ole_Luehn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'm able to join the two table table &amp;amp; able to find the JSL code to fill &amp;amp; replace missing with previous value (this can be done through GUI too).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Open Data Table: Date_Category.jmp
// → Data Table( "Date_Category" )
Open( "$DESKTOP/Data/Date_Category.jmp" );

// Open Data Table: Date-Category-Goto.jmp
// → Data Table( "Date-Category-Goto" )
Open( "$DESKTOP/Data/Date-Category-Goto.jmp" );

// Change column info: Date
Data Table( "Date_Category" ):Date &amp;lt;&amp;lt; Data Type( Character ) &amp;lt;&amp;lt;
Set Modeling Type( "Nominal" );

// Change column info: Date-goto
Data Table( "Date-Category-Goto" ):"Date-goto"n &amp;lt;&amp;lt; Data Type( Character ) &amp;lt;&amp;lt;
Set Modeling Type( "Nominal" );

// Change column name: Category → Category1
Data Table( "Date_Category" ):Category &amp;lt;&amp;lt; Set Name( "Category1" );

// Join data tables
// → Data Table( "Test" )
Data Table( "Date-Category-Goto" ) &amp;lt;&amp;lt; Join(
	With( Data Table( "Date_Category" ) ),
	Select( :"Date-goto"n ),
	SelectWith( :Category1 ),
	By Matching Columns( :"Date-goto"n = :Date ),
	Drop multiples( 0, 0 ),
	Include Nonmatches( 1, 0 ),
	Preserve main table order( 1 ),
	Output Table( "Test.jmp" )
);


//Fill in empty rows
Names Default To Here( 1 );
dt = Current Data Table();

dtcollist = dt &amp;lt;&amp;lt; get column names;

dtMat = (dt &amp;lt;&amp;lt; Get All Columns As Matrix);

For( i = 1, i &amp;lt;= N Items( selection ), i++,
colNum = Contains( dtColList, Name Expr( selection[i] ) );
vMat = dtMat[0, colNum];
mis = Loc( Is Missing( vMat ) );
If( N Row( mis ),
col = column(selection[i]);
If( mis[1] == 1,
col[1] = col[(Loc( vMat ))[1]]
);

For( j = if(mis[1]==1, 2, 1), j &amp;lt;= N Row( mis ), j++,
col[mis[j]] = col[mis[j] - 1]
);
);
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WebDesignesCrow_0-1727339282140.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68601iEEDA63A60FB9A4C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WebDesignesCrow_0-1727339282140.png" alt="WebDesignesCrow_0-1727339282140.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Pls refer to link below too since I can't really explain how the fill-in script works ;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-until-next-entry-and-continue/td-p/269171" target="_self"&gt;https://community.jmp.com/t5/Discussions/How-to-replace-empty-rows-until-next-entry-and-continue/td-p/269171&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.jmp.com/t5/JMP-Add-Ins/Fill-Missing-Cells/ta-p/460326" target="_self"&gt;https://community.jmp.com/t5/JMP-Add-Ins/Fill-Missing-Cells/ta-p/460326&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 08:48:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-join-two-tables-and-fill-automatically-empty-rows/m-p/801983#M97793</guid>
      <dc:creator>WebDesignesCrow</dc:creator>
      <dc:date>2024-09-26T08:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to join two tables and fill automatically empty rows?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-join-two-tables-and-fill-automatically-empty-rows/m-p/802009#M97799</link>
      <description>&lt;P&gt;Hi. It worked - I downloaded this Add-In - and updated my merged file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you - now I can continue.&amp;nbsp;&lt;BR /&gt;Best wishes.&lt;BR /&gt;Ole&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 11:55:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-join-two-tables-and-fill-automatically-empty-rows/m-p/802009#M97799</guid>
      <dc:creator>Ole_Luehn</dc:creator>
      <dc:date>2024-09-26T11:55:10Z</dc:date>
    </item>
  </channel>
</rss>

