<?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: Conditional formatting by row state of different columns. in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-by-row-state-of-different-columns/m-p/653888#M84324</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/44958"&gt;@GregF_JMP&lt;/a&gt;&amp;nbsp; &amp;amp;&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp; Thank you both for the prompt support and insight.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have it working now and are progressing with the analysis. I was stuck on this for four hours. Really appreciate your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greg, your pun of "downstream analysis" goes noted and appreciated since these are fish data... :)&lt;/img&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jun 2023 20:41:48 GMT</pubDate>
    <dc:creator>Frogger</dc:creator>
    <dc:date>2023-06-28T20:41:48Z</dc:date>
    <item>
      <title>Conditional formatting by row state of different columns.</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-by-row-state-of-different-columns/m-p/653825#M84316</link>
      <description>&lt;P&gt;Good Day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 1.7mil rows of data that are linked with common identifiers. I can format smaller portions of it it in Excel but with the size of the file (greater than the excel limit) and the need to reproduce similar data sets I would like to figure out how to code the data in JMP.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column A (FID) is a series of fish identification numbers (1,2,3…) with a variable number of reads which populate Column B (Time). Every read for Column B is an interval of 20 seconds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column B start at various reads &amp;gt;28000 as a result of the previous time stamp they were associated with.&amp;nbsp;I want the first read of each FID to start at 0 then increase by 20 for every row associated with that FID.&amp;nbsp;So C2 will equal 0 sec., C3 will be 20 sec., C4 will be 40 sec., and so on until we get to FID =2 then it will reset and start counting it at 0, 20, 40, 60.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Excel, as seen below, I can set the first row of a new column to "0" then apply the formula:&amp;nbsp;=IF(A4=A3,C3+20,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I attempt to apply similar logic to the conditional formula in JMP I cannot figure out how to have it recognize the value of each row and adjust. Likely a fundamental difference between data handling packages like Excel and statistical packages like JMP, but JMP is my preferred software for analysis and the size of the data files requires it. I am using Version 16, JMP.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts are appreciated. An excerpt of the data are attached for practice purposes.&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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Frogger_0-1687977799868.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54235iF0B46E24ECE211A7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Frogger_0-1687977799868.png" alt="Frogger_0-1687977799868.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 18:55:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formatting-by-row-state-of-different-columns/m-p/653825#M84316</guid>
      <dc:creator>Frogger</dc:creator>
      <dc:date>2023-06-28T18:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting by row state of different columns.</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-by-row-state-of-different-columns/m-p/653851#M84318</link>
      <description>&lt;P&gt;The formula to use is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Cumulative Sum( 20, :FID ) - 20&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The subtraction of 20 is because the Col Cumulative Sum will start at 20&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1687980205879.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54241i0C951A04838F4E9E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1687980205879.png" alt="txnelson_0-1687980205879.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 19:23:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formatting-by-row-state-of-different-columns/m-p/653851#M84318</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-06-28T19:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting by row state of different columns.</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-by-row-state-of-different-columns/m-p/653853#M84319</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;It appears that you are starting with a sorted table, so this should go swimmingly.&amp;nbsp; &amp;nbsp; You will be able to do this with a column formula for a column we will call "New_Time", but realize that unlike excel, where the first row could manually be set to zero, JMP requires all formulas within a column to be the same.&amp;nbsp; The Lag function will be useful in this case and will behave like an Excel relative reference to the row above.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The graphic image from the formula editor for a column called "New_Time" is shown below.&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="GregF_JMP_1-1687979919524.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54240i9490EB8A87149182/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregF_JMP_1-1687979919524.png" alt="GregF_JMP_1-1687979919524.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is described:&lt;/P&gt;
&lt;P&gt;If the current row is == 1, OR if the current value of FID is different than the previous lag(FID,1), then the "time" of the current row is zero (reset).&amp;nbsp; &amp;nbsp;Else, add 20 to the prior value of the column New_Time (the cell above).&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;I have also included the JSL, that can be copied into the formula editor with a double click to JSL mode.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() == 1 | :FID != Lag( :FID, 1 ),
	0,
	Lag( :New_Time, 1 ) + 20
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Notice that JMP comparison operators are double equals (vs excel single), and not equals in JMP is != (vs excel &amp;lt;&amp;gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck with this data preparation step, hope that the column formula enables all of the downstream analysis.&lt;/P&gt;
&lt;P&gt;-G&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 19:26:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formatting-by-row-state-of-different-columns/m-p/653853#M84319</guid>
      <dc:creator>GregF_JMP</dc:creator>
      <dc:date>2023-06-28T19:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formatting by row state of different columns.</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formatting-by-row-state-of-different-columns/m-p/653888#M84324</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/44958"&gt;@GregF_JMP&lt;/a&gt;&amp;nbsp; &amp;amp;&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp; Thank you both for the prompt support and insight.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have it working now and are progressing with the analysis. I was stuck on this for four hours. Really appreciate your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greg, your pun of "downstream analysis" goes noted and appreciated since these are fish data... :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 20:41:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formatting-by-row-state-of-different-columns/m-p/653888#M84324</guid>
      <dc:creator>Frogger</dc:creator>
      <dc:date>2023-06-28T20:41:48Z</dc:date>
    </item>
  </channel>
</rss>

