Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InList Operator. 1

Status
Not open for further replies.

jm134

IS-IT--Management
May 19, 2003
6
0
0
US
Lets say I've got a report with a month demension, region demension and some kind of measure. I've got 12 months but I only want show the sum of three months ( doesn't matter which 3 months). I want to accomplish this using a formula not a filter. I was thinking I could use the InList operator to do this ,, but I’m having problems getting the syntax to work. I was thinking it would look something like this
=<Sales> InList (<Month (YYYYMM)>(200406, 200407, 200408)
but to no avail. Any suggestions ?
 
In List is not possible for this. You need to use the Where operator.

=<Sales> Where (<Month (YYYYMM)=200406) + Sales> Where (<Month (YYYYMM)=200407)+ Sales> Where (<Month (YYYYMM)=200408)

Steve Krandel
VERITAS Software
 
That was it. Thanks a lot. You'd be surprised at how many folks ( including me ) didn't know how to do that. There has got to be another way to do though. I just doesn't make sense to have an InList or In operator if you can't accomplish something like the aforementioned issue. Thanks again,, that was a big help.
 
The in list operator is for creating filters.

You probably could have use In List, but you'd have to use and If statement:

=if (<Month (YYYYMM)> in list (200406, 200407, 200408) then <Sales> else 0

That would have accomplished just about the same thing.

Steve Krandel
VERITAS Software
 
Code:
[COLOR=red]I just doesn't make sense to have an InList or In operator [/color]

You're hitting the part where BO deviates from what you have learned in SQL. The 'Where' construction only allows fixed value expression, whereas 'In' is used to state an explicate context. The 'InList' is the equivalent of 'In' with SQL.
I have just one (1) super-user who managed to figure it all out, the rest is still struggling :)

Ties Blom
Information analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top