I have a column “Var” with rows containing strings of the pattern “foo_bar”. “foo” and ”bar” are of variable lengths and I want to retain only the “bar”-part. I couldn’t find a way to replace “foo_“ with ”nothing” (in a filter?).
The most straight way is to do a simple ‘Filter’ action in the data wizard. Replace ‘foo_bar’ for ‘bar’. Is there a reason you might need to use a custom transformation?
For a custom transformation, in your case you can also use
Both foo and bar are variable, eg., foo (formulation, treament…) and bar (T, R, A…) I want to avoid manual entries which seem to be necessary in filters.
For a custom transformation, in your case you can also use
replace(var,1,4, "")
or
substitute(var,"_bar","")
For the first one I do not know the number 4 beforehand and for the second on what “bar” actually is. I guess I have to stick to my clumsy formula.