Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm wondering if it is possible to handle the following issue in a set analysis:
have the next data structure:
KEY| numericValue| FIELD1 | FIELD2
I need to calculate a sum on a certain field (numericValue) under to conditions:
1) FIELD1 = 1 OR FIELD2= 2
at first I had only FIELD1 and I used a sum with a simple set analysis, not I have an OR clause and
I'm trying to find a solution, and don't know whether set analysis supports OR clause.
Regards,
Boris
SUM({<FIELD1 = {1}> + <FIELD2 = {2}>}Sales)
Hi Try this:
sum({<Field={1}>+<Field={2}>} values)
HTH
sushil
+ means OR?
what about AND then? is it represented by a comma?
can you give me an example for this type of set analysis:
condition1 AND (condition2 OR condition3)
FIELD1 = 1 And FIELD2 = 2
SUM({<FIELD1 = {1},FIELD2 = {2}>}Sales)
=SUM({<Region = {'R1','R3'}>+<Country = {'Holand'}>}Sales)
The above will give you SUM(Sales) for Region = either R1 and R3 or Country = Holand...
So,
SUM({<Region = {'R1','R3'}>}Sales) + SUM({<Country = {'Holand'}>}Sales)
condition1 AND (condition2 OR condition3) = (cond1 And cond2) Or (cond1 And cond3)
SUM({<FIELD1 = {1},FIELD2 = {2}> + <FIELD1 = {1},FIELD3 = {3}>}Sales)