Vicky Nguyen Posted October 7, 2020 Share Posted October 7, 2020 [Category] Growth Data-Day 14-Overnight Hold Harvest-Cell Density (cells/mL) Growth Data-Day 14-Overnight Hold Harvest-TVC (cells) Growth Data-Day 7-Xuri Inoculation-Cell Density (cells/mL) Growth Data-Day 7-Xuri Inoculation-TVC (cells) Growth Data-Day 8-Expansion-Cell Density (cells/mL ....... I have lot more rows. My data is have two types. I want to add calculated column, If ([Category] contain a word "Cell Density", "Density","TVC"). What is sytax for Link to comment Share on other sites More sharing options...
Fabian Duerr Posted October 8, 2020 Share Posted October 8, 2020 You could use a combination of CASE and FIND function case when FIND("Cell Density", [Category]) > 0 then .... when FIND("Density", [Category]) > 0 then .... when FIND("TVC", [Category]) > 0 then .... else .... endThe FIND function is case sensitiv. So if your data is not consistent you should convert your strings to upper or lower case using UPPER or LOWER function. The function will find the position of a given strind and returns an integer. So '>0' just means that the string has been found at some place. In the CASE function the order will matter. If you look for "Density" first you will not find any "Cell Density" entries as they were already assigned to "Density". Check Spotfire Help for further information. I hope this was what you were looking for. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now