cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
YGerchman
Level II

Get column value related to another column minimum

Hi,

I am looking for easier way (without scripting) for extract the X column value of Y axis minimum for each plot/charts.

I have N columns chart, the first column is the X axis. the other is sets of measurements\reading.

I want to get the X value which related to each set of plots.

I did it by script but i want to know if there is an easier way.

attached example for data format.

following the script I wrote. that may help to understand the result I want.

dt=Current Data Table();
ds=New Table();
ds<<New Column("X axis");
ds<<New Column("Min value");
for(i=2,i<=ncols(dt),i++,	
min=100;
minRow=1;
	for(j=1,j<=nrows(dt),j++,
	if(column(dt,i)[j]<min, min=column(dt,i)[j]; minRow=column(dt,1)[j]);
);
ds<<add row(1);
	column(ds,1)[i-1]=minRow;
	column(ds,2)[i-1]=min;
);

BR,

Yoav

1 REPLY 1

Re: Get column value related to another column minimum

Hi,

 

Here is a point-and-click way; it is actually pretty efficient.

 

1) Stack the table: place the y columns into "Stack Columns", type "Y min" into the 'Stacked Data Column' text edit box. Hit OK.

 

brady_brady_0-1677722519246.png

 

2) In the stacked table, select the Label  and Ymin columns, right-click on the blue-shaded column header, and select Sort > Ascending

 

brady_brady_1-1677722623801.png

 

3) Select just the Label column, then select from the main menu Rows > Row Selection > Select Duplicate Rows

 

brady_brady_2-1677722925815.png

 

4) Right-click in the blue region of the selected rows and select Delete Rows 

 

brady_brady_3-1677724442126.png

 

The resulting table has the desired summary info:

brady_brady_4-1677724496049.png