3 Replies Latest reply: Dec 5, 2015 8:42 AM by Clever Anjos

# AND / IF / OR in master measures ISSUE

Hi Guys,

This formula doesn't  work. I have created it within a Master Measure
What this formula does:

- Find the email addresses that have submitted one and only one answer (aggregate your_answer by email address)
- if this unique answer is = 28 or #javascript or #javas --> Assign Pass

- Otherwise assign Fail

ISSUE: it assigns Pass only if the answer is 1 equal to 28.

if the your_answer grouped by email address is 1 and equal to #javascript or #javas it assignes FAIL

if(

(

(

)

AND if(

)

),'Pass', 'Fail'

)

Guess that it's a syntax problem

Any Idea?

Thank you in advance

PS. Please note that I am not in the script but in the Master Items Creation

• ###### Re: AND / IF / OR in master measures ISSUE

I'm not sure if I have understand your conditions right but the expression should look more like this:

AND

match([your_answer], 28, '#javascript', '#java'),'Pass', 'Fail')

- Marcus

• ###### Re: AND / IF / OR in master measures ISSUE

Hi Marcus,

Thanks for your reply and apologies if I wasn't clear.

this is the issue I have:

my formula works, but I have a problem with identifying strings.
If I take my formula and instead of #java and #javascipt I put 29 and 30
it works perfectly

but I need to formula to scan the fields and identify if they contain strings (#java and #javascript)

So I guess that it's a syntax problem related to "Scanning a field and identifying if there is a specific string within it"

the syntax '#javascript' doesn t work. The syntax '\$(#javascript)' doesn t work either.
again, if I want to "Scan a field and identify if there is a specific number within it", it works.

Suggestions?

Best

P

• ###### Re: AND / IF / OR in master measures ISSUE

Try WildMatch() function

WildMatch('abcas28','*#java*','*#javascript*','*28*')