Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day everyone,
The set analysis example below returns the sales for current selection, with new selections both in "Year" AND in "Region",
=sum({$<Year = {2000}, Region = {US, SE, DE, UK, FR}> Sales)
My question is how about for the OR, is there a way for this?
Thanks in advance and more pwoer...
Jason
You can find more examples on page 353 of manual
=sum({$<Year = {2000},Region += {US, SE, DE, UK, FR}>} Sales)
Hi Irossi,
Thanks for the reply. Basically the set analysis returns the sales with selections both in "Year" AND "Region. What about for "Year" OR "Region"? Is it correct to have:
=sum({$<Year = {2000} OR Region = {US, SE, DE, UK, FR}>} Sales)
?
Thanks again,
jason
Hello,
Maybe what you are trying to accomplish is not really something that you would use Set Analysis for.
Think about it... the variables being set using set analysis are not conditions, what you do with set analysis is narrow your universe of information to something very specific, sometimes regardless your selections. If there was a way of using an OR operator in set analysis, you would have two sets of data... how do you define which one to use in your expression?
What I'm guessing is that you want the expression to be evaluated either when the year selected is 2000 or when selecting some of the specified Regions. If my guess is correct, you can use the function getfieldselections.
Hope this helps.
Mike.
An "OR" in set analysis is a union of two sets. You do a union with the "+" operator like so:
sum({<Year={2000}>+<Region={US,SE,DE,UK,FR}> Sales)
ok, thank you very much.
jason
Please explain with an example, that will help me to implement the concept in my application.
Advance Thanks.
Hi John,
could you please verify the sample above, it seems to be a broken feature. It's not working for me in V9R3 and V9R5.
regards
Sven
Hi there, why dont you try splitting the expression in two, like this:
=sum({ $<Year = {2000}> } Sales) + sum({ $<Region = {US, SE, DE, UK, FR}> } Sales)
Regards
ps.:
I've just recognised, it's working again in V9R6.
be aware & happy qliking
Sven