how to use sumifop in EM?

More
4 years 7 months ago #90951 by bebs
bebs created the topic: how to use sumifop in EM?
Hello.

What is the syntax of first argument (op) in sumifop(op, val1, val2,..)?
docs.limesurvey.org/Expression+Manager#Implemented_Functions


My answer label set is composed of a few "valid" results (eg 0->4) and a few possible answers that should give me different "error codes", such as "I don't know" or "not applicable" or "I don't understand the question".

I would like to sum up the answers of different questions using the same set, excluding automatically the error codes.

I guess one possible way is to associate to error codes negative values, and filter them out of the sum using sumifop, as in:
{sumifop(">0",Q1.value,Q2.value,Q3.value)} ... but I cannot figure the syntax of the first "op" argument: with hyphen it does not filter, without hyphens it does not parse.

Any pointer welcome, thanks.
Bebs.

Please Log in to join the conversation.

More
4 years 7 months ago - 4 years 7 months ago #90952 by bebs
bebs replied the topic: how to use sumifop in EM?
Sorry, I didn't read the documentation properly, as the right syntax is
number sumifop(op, value, arg1, arg2, ... argN)

I should have used
sumifop(">", 0, Q1.value, Q2.value...)

which works perfectly. thank you VERY much for this great feature!
Last Edit: 4 years 7 months ago by bebs.

Please Log in to join the conversation.

  • limesun
  • limesun's Avatar
  • Visitor
  • Visitor
3 years 10 months ago #100375 by limesun
limesun replied the topic: how to use sumifop in EM?
you can use sum(group),i am not sure ls has this.

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now