Jump to content

Calculated column with conditional unique concatenate


Sheryl Enos

Recommended Posts

Is it possible to insert a calculated column that will list the closest neighbors based on a value

For example. I have a list of samples with a value for an assay. Can I create a calculated column that will uniquely concatenate the other samples with the same value I have an example attached with the desired output format.

Thank you!

Link to comment
Share on other sites

The below expression will get you the results at the bottom.

case

when [Assay]=1 then Concatenate([sample])

when [Assay]=2 then Concatenate([sample])

when [Assay]=3 then Concatenate([sample])

when [Assay]=4 then Concatenate([sample])

when [Assay]=5 then Concatenate([sample])

end

 

Sample1, Sample6

Sample2, Sample3, Sample5, Sample10

Sample2, Sample3, Sample5, Sample10

Sample4, Sample7

Sample2, Sample3, Sample5, Sample10

Sample1, Sample6

Sample4, Sample7

Sample8

Sample9

Sample2, Sample3, Sample5, Sample10

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...