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

Pulling Row Data for each Max Value from a Column

I have a table with the first column being my time varying X-axis variable and all the remaining columns being the Y-axis response columns. I'm looking to create a subset table based on the Maximum value of each Y-axis column. I.E. The subset table should be all the rows in the original table that have a Maximum value in one of the corresponding Y-axis columns. That way I can compare at what X-axis value all of my Y-axis maximums occurred. (Even better would be the X-axis value paired with the single Y-axis maximum, but we'll get there later)

 

Is there a simple way to do this through Summary or Subset tables?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Pulling Row Data for each Max Value from a Column

I think using Stacked column might be the easiest option if I understand correctly what you want.

Start data:

jthi_0-1691696648010.png

 

Stack the data columns (column 2 and column 3):

jthi_1-1691696669021.png

Add new formula column to check if row is max for specific Label

:Data == Col Max(:Data, :Label)

From here you have 1 on those rows which are maximum for labels

jthi_2-1691696719793.png

 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Pulling Row Data for each Max Value from a Column

I think using Stacked column might be the easiest option if I understand correctly what you want.

Start data:

jthi_0-1691696648010.png

 

Stack the data columns (column 2 and column 3):

jthi_1-1691696669021.png

Add new formula column to check if row is max for specific Label

:Data == Col Max(:Data, :Label)

From here you have 1 on those rows which are maximum for labels

jthi_2-1691696719793.png

 

-Jarmo

Re: Pulling Row Data for each Max Value from a Column

Yup, that's what I was looking for. I like the Stacked idea. I was just playing with using a Formula to add the flags, but I think the Stacked column would make that cleaner!

BatteryTamer359_0-1691698141422.png