Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi again,
lets say i have this exrpesion
sum( if(STATUS1='open' OR STATUS2='open',sales)
is there a way to convert it into set analysis?
basicly what i need is a way to make an OR selection between values in two fields.
is this posible?
come to think of it i don't really know how to do it with normal selections.
i mean with clicking on values in the layout.
any suggestions?
Set analysis includes operators for union (+), intersection (*), exclusion (-) and XOR (/). So I think you'd write it like this:
sum({<STATUS1={open}>+<STATUS2={open}>}sales)
But I could easily have the syntax wrong, as I didn't see any good examples in the help text. A little experimentation should get you there.
Set analysis includes operators for union (+), intersection (*), exclusion (-) and XOR (/). So I think you'd write it like this:
sum({<STATUS1={open}>+<STATUS2={open}>}sales)
But I could easily have the syntax wrong, as I didn't see any good examples in the help text. A little experimentation should get you there.
hi there John
in the help it sais:
"All set operators use sets as operands"
in your example you are using modifiers(<>) as operands
is that allowed?
I'm not using modifiers as operands. I'm using sets as operands. The first set is <STATUS1={open}>. The second set is <STATUS2={open}>. Works fine. See attached.
Sum( {$<status1={open}>} Value) + Sum( {$<status2={open}>} Value)
carneyfm wrote:
Sum( {tiny_mce_markerlt;status1={open}>} Value) + Sum( {tiny_mce_markerlt;status2={open}>} Value) <div></div>
Not if the two sets intersect. For a very simple example, say there's only one record, both status1 and status2 are open, and the Value is 1. Your expression will return 2. It should return 1.
hmm i can see its working allright but...
i thought if its enclosed in <> then its a modifier
from the help:
"The modifier consists of one or several field names, each followed by a selection that should be made on the field, all enclosed by < and >"
Hmmm, I agree with you - it sounds like the help text is saying that I'm doing a union on two modifiers, not on two sets. And that doesn't sound like something that would work. Since it DOES work, I'd just chalk it up to poorly-written help text. I do certainly feel that the set analysis help could be more clear, and more importantly, could include a lot more examples.