Page 1 of 1

CONTAINS filter

Posted: Tue Nov 24, 2020 8:28 pm
by kemelzaidan
I want to do what I believe it should be very easy to do on jamovi, but I'm having a great difficulty. If you can see from the image below, I have a CSV with 3 variables "image_id", "image_name" and "volume_id". What I would like to do is simply filter "image_name" for values which have "Windows" in it (or "W2") in order to count how many of those images are Windows images on the frequency tables on the right.

But I've tried many times getting the right formula on the filter without any success. The error message does make it clear what I'm doing wrong. What would be the right formula to achieve such a result?

Image

Re: CONTAINS filter

Posted: Wed Nov 25, 2020 9:55 am
by sbalci
Hi,
I just learned the answer.

Please try

Code: Select all

= CONTAINS ('W2', image_name)

Re: CONTAINS filter

Posted: Wed Nov 25, 2020 10:26 am
by MAgojam
Hi, @kemelzaidan.

For your filter I suggest you use the CONTAINS() function like so:
CONTAINS ("Windows", "W2", image_name)
Take a look at the screenshot that I am attaching to you.
ScreenShot_20201125.PNG
ScreenShot_20201125.PNG (55.06 KiB) Viewed 4608 times
Remember that it is case sensitive and you can add other substrings before the name of the variable (s) of interest.

Cheers,
Maurizio

Re: CONTAINS filter

Posted: Wed Dec 02, 2020 5:27 pm
by kemelzaidan
It did work. So many thanks. I believe that the hint and error messages just need to be a bit more clear.

Thanks again.