<?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 Creating delta values plot between two subsets; want to select 2 'tests' to compare among multiple test values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/839959#M101492</link>
    <description>&lt;P&gt;I am plotting CD vs. Depth plot, for total 8 sets in the example (A-a, A-b, B-a, B-b....).For each Test A~D, there are 2 different 'Location' a and b.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to pick 2 set specifically and create a delta plot; for example, If I select A-a and B-a, CD values are subtracted at each depth and CD vs. Depth plot should be generated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this something I can do at JMP? I was trying to do this in excel using xlookup function, but since the amount of data is huge (30000+ rows) it is just too slow. I am not sure if this something I can do at JMP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example data set&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EdgeMarmoset719_1-1739301136957.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/72825i184F75CFCD5962E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EdgeMarmoset719_1-1739301136957.png" alt="EdgeMarmoset719_1-1739301136957.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example CD vs. Depth plot;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EdgeMarmoset719_2-1739301617796.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/72826iF7CBC2F8E2B8F516/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EdgeMarmoset719_2-1739301617796.png" alt="EdgeMarmoset719_2-1739301617796.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>Tue, 11 Feb 2025 20:44:44 GMT</pubDate>
    <dc:creator>EdgeMarmoset719</dc:creator>
    <dc:date>2025-02-11T20:44:44Z</dc:date>
    <item>
      <title>Creating delta values plot between two subsets; want to select 2 'tests' to compare among multiple test values</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/839959#M101492</link>
      <description>&lt;P&gt;I am plotting CD vs. Depth plot, for total 8 sets in the example (A-a, A-b, B-a, B-b....).For each Test A~D, there are 2 different 'Location' a and b.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to pick 2 set specifically and create a delta plot; for example, If I select A-a and B-a, CD values are subtracted at each depth and CD vs. Depth plot should be generated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this something I can do at JMP? I was trying to do this in excel using xlookup function, but since the amount of data is huge (30000+ rows) it is just too slow. I am not sure if this something I can do at JMP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example data set&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EdgeMarmoset719_1-1739301136957.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/72825i184F75CFCD5962E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EdgeMarmoset719_1-1739301136957.png" alt="EdgeMarmoset719_1-1739301136957.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example CD vs. Depth plot;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EdgeMarmoset719_2-1739301617796.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/72826iF7CBC2F8E2B8F516/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EdgeMarmoset719_2-1739301617796.png" alt="EdgeMarmoset719_2-1739301617796.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>Tue, 11 Feb 2025 20:44:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/839959#M101492</guid>
      <dc:creator>EdgeMarmoset719</dc:creator>
      <dc:date>2025-02-11T20:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating delta values plot between two subsets; want to select 2 'tests' to compare among multiple test values</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/839969#M101493</link>
      <description>&lt;P&gt;With scripting this can definitely be done and maybe also without scripting at least as a workflow. Can you provide example dataset and can you only pick two pairs at the same time? Also is the location always same for selected tests?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 20:59:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/839969#M101493</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-02-11T20:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating delta values plot between two subsets; want to select 2 'tests' to compare among multiple test values</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/839970#M101494</link>
      <description>&lt;P&gt;Sure, here is the example data file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to get the delta value between two pair, so yes I'd always pick 2 for comparison.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Location may not be the same, in the real data set I have some samples that have more locations. I also need to compare sample to sample as well as location to location. For instance, sample A-a to sample C-b&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 21:10:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/839970#M101494</guid>
      <dc:creator>EdgeMarmoset719</dc:creator>
      <dc:date>2025-02-11T21:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Creating delta values plot between two subsets; want to select 2 'tests' to compare among multiple test values</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/840377#M101497</link>
      <description>&lt;P&gt;Is it OK if new data table is created after user selections? My basic idea would be with scripting:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Add ordering column to your data&lt;/LI&gt;
&lt;LI&gt;Create UI in which user can pick from list box which combinations to compare&lt;/LI&gt;
&lt;LI&gt;User presses OK and new table will be created with data for those two combinations&lt;/LI&gt;
&lt;LI&gt;Difference will be calculated&lt;/LI&gt;
&lt;LI&gt;Visual the data&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Other option that comes to my mind is to split the data and pre-calculate all the differences into columns. Then you could use Column Switcher in graph builder to change which to compare.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 05:46:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/840377#M101497</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-02-12T05:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating delta values plot between two subsets; want to select 2 'tests' to compare among multiple test values</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/840946#M101519</link>
      <description>&lt;P&gt;I wanted to see if I can quickly change conditions for comparison. It seems that is not as straightforward.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculating all the differences would not work since there are so many data set I would think.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help, let me think a bit more.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 22:50:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/840946#M101519</guid>
      <dc:creator>EdgeMarmoset719</dc:creator>
      <dc:date>2025-02-12T22:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating delta values plot between two subsets; want to select 2 'tests' to compare among multiple test values</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/841160#M101520</link>
      <description>&lt;P&gt;Only scripting options come to my mind (outside of that splitting). I consider JMP tables to be more like database tables than spreadsheet, so the calculations are (usually) done on row level and as aggregations. If the test count is always the same for each of the "pairs" this can be maybe done with a few formula columns and global data filter to make picking options easier.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 05:47:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/841160#M101520</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-02-13T05:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating delta values plot between two subsets; want to select 2 'tests' to compare among multiple test values</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/841426#M101537</link>
      <description>&lt;P&gt;With scripting you can create things like this (this is missing some sanity checks)&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 = Current Data Table();
dt &amp;lt;&amp;lt; New Column("Group", Character, Nominal, Formula(
	"Test: " || :Test || " Location: " || :Location
));

Summarize(dt, groups = By(:Group));


dt_temp = New Table("TEMPTABLE",
	Add Rows(5), // same as your group size
	Compress File When Saved(1),
	New Column("Depth",
		Numeric,
		"Continuous",
		Values([0, 20, 40, 60, 80])
	),
	New Column("CD First",
		Numeric,
		"Continuous"
	),
	New Column("CD Second",
		Numeric,
		"Continuous"
	),
	New Column("CD diff",
		Numeric,
		"Continuous"
	),
	Invisible
);

update_expr = Expr(
	Try(
		first_group = (lb_first &amp;lt;&amp;lt; get selected)[1];
		second_group = (lb_second &amp;lt;&amp;lt; get selected)[1];

		first_cd = dt[dt &amp;lt;&amp;lt; Get Rows Where(:Group == first_group), "CD (nm)"];
		second_cd = dt[dt &amp;lt;&amp;lt; Get Rows Where(:Group == second_group), "CD (nm)"];
		dt_temp[0, "CD First"] = first_cd;
		dt_temp[0, "CD Second"] = second_cd;
		dt_temp[0, "CD Diff"] = Abs(second_cd - first_cd);
	,
		dt_temp[0, "CD First"] = [., . ,., ., .];
		dt_temp[0, "CD Second"] = [., . ,., ., .];
		dt_temp[0, "CD Diff"] = [., . ,., ., .];
	);
);

nw = New Window("Demo",
	H List Box(
		Panel Box("Pick First Group",
			lb_first = List Box(groups)
		),
		Panel Box("Pick Second Group",
			lb_second = List Box(groups)
		),
		Data Table Box(dt_temp),
		gb = dt_temp &amp;lt;&amp;lt; Graph Builder(
			Size(525, 454),
			Show Control Panel(0),
			Variables(X(:CD diff), Y(:Depth)),
			Elements(Points(X, Y, Legend(11)), Line(X, Y, Legend(13)))
		),
		Panel Box("Actions",
			Lineup Box(N Col(1),
				Button Box("Cancel")
			)
		)
	)
);

lb_first &amp;lt;&amp;lt; Set Max Selected(1);
lb_second &amp;lt;&amp;lt; Set Max Selected(1);

lb_first &amp;lt;&amp;lt; Set Script(update_expr);
lb_second &amp;lt;&amp;lt; Set Script(update_expr);

Eval(EvalExpr(
	nw &amp;lt;&amp;lt; On Close(
		Close(dt_temp, no save);
	)
));&lt;/CODE&gt;&lt;/PRE&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_1-1739472136044.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/72922iD0D0CF13F4ABF29F/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_1-1739472136044.png" alt="jthi_1-1739472136044.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I think you could also duplicate your table so you can do a self-join with "duplicated" columns, join it to the original table by depth, remove self-joins, create grouping selector, formula for differences and create a plot&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1739472611700.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/72923iBF6FDC3BEAF82734/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1739472611700.png" alt="jthi_2-1739472611700.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And this is easy to automate in JMP.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_5-1739472774400.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/72926i35D945C0C19F8EF4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_5-1739472774400.png" alt="jthi_5-1739472774400.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 18:53:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-delta-values-plot-between-two-subsets-want-to-select-2/m-p/841426#M101537</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-02-13T18:53:09Z</dc:date>
    </item>
  </channel>
</rss>

