Welcome, Guest
Username: Password: Remember me

TOPIC: Sum equation not 'summing'

Sum equation not 'summing' 2 years 5 months ago #77743

I wrote this code using expressions generated from the condition manager.
sum ((regexMatch ("/q1.code==Q1P/" , Q1.NAOK )) and (Q2.NAOK == "Q2P" ) and (Q3.NAOK == "Q3P" ) and (Q4.NAOK == "Q4P" ) and (Q5.NAOK == "Q5P" ) and (Q6.NAOK == "Q6P" ) and (Q7.NAOK == "Q7P" ) and (Q8.NAOK == "Q8P" ) and (Q9.NAOK == "Q9P" ))

No matter what I answer the sum always results in displaying "0".

What am I doing wrong? :( I would like to get a number for how many of these questions received those answers.

For the first question I used Regular Expression, and the rest I used Equals. I applied the same code with the answer code substituted for the four different answer types. so Q1P interchanged with Q1E, Q1N, Q1G, based on which sum I was trying to get.
The administrator has disabled public write access.

Re: Sum equation not 'summing' 2 years 5 months ago #77744

  • nkorf
  • nkorf's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Thank you received: 1
  • Karma: 1
Have you tried to replace 'and' with a comma to see if it works ?
The administrator has disabled public write access.

Re: Sum equation not 'summing' 2 years 5 months ago #77745

Well I hadn't tried it but THANK YOU!

That did the trick.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.150 seconds
Donation Image