I have a custom search where I want a Case stateme...
# general
j
I have a custom search where I want a Case statement that require 2 things to be correct. Currently I have sum(case when {custbody_make} != 'Yamaha' then 0 else 1 end). I want to also add 1 additional criteria that the {custobody_program} is New. I cant seem to get it to work. I just get an error
m
You should use AND/OR with your criteria
when {custbody_make} != ‘Yamaha’ AND {custbody.year} = ‘1999’ then 0
At least, I think that’s what you want…
sorry, just reread your question.. updated answer to be…. when {custbody_make} != ‘Yamaha’ AND {custbody.program} = ‘New’ then 0
j
Thanks for the response. I will try it now
sum(case when {custbody_make} != ‘Yamaha’ AND {custbody_program} = ‘New’ then 0 else 1 end)
So it should look like the above right?
That seemed to work. Thank you again
hmmm for some reason it give me a number that is all Yamaha, but isnt taking into account the program being "New" also
I have the summary type as maximum