Using InList in webintelligence

hello,

I am trying to use a simple In List expression in a variable but no luck whatsoever at all … none, nada, ziltch, etc … :wah:

See the following expression:
=if([FruitType] In (“Apple”);“nice nice”;“no no no”)

(I realise I do not need to use ‘In’ with only one value, however I was trying to bring this to a very simple form because I couldn’t make it work with multilpe values either.

When using the above, WebI comes back to me saying that there is a syntax error at position 27 (which is after the second double quote) … I really don’t understand what is wrong with the expression … I tried with comma’s, single quotes, no quotes, hyphens etc … bu no luck whatsoever …

can someone help me?

thanks,

leroyb


leroyb (BOB member since 2004-02-16)

Hi,

use InList and not In…it’s even in your topic header… :mrgreen:

In is used for context calculations

Regards

Gerard


highandstoned :netherlands: (BOB member since 2005-08-01)

HighandStoned,

thanks for your answer - I do indeed have the inList in the subject to kinda hint at people as to what I am trying to achieve :wink:

The thing is that I obviously also tried InList and In List and List and IL and NiTsil and ListIn and quite a few more combinations for the sake of it … none of them worked I am afraid to report …
When I use In List or InList then WebI returns an error message when I validate the formula saying that the object List (or InList) does not exist on the report.

However, I can find the keyword/operator In in the list of available operators and It looks like that is the one I should be using however, although WebI accepts the operator, it gives an error regarding the arguments following the operator …

FYI, InList works exactly as expected in the full client.

any ideas?

regards,

leroyb


leroyb (BOB member since 2004-02-16)

Hi,

is used this syntax (webi 6.5.1)

=If([YearMonth] InList(200412);"yes";"no")

and this works. I get errors when I try “200412” and not 200412 so it checks the datatype.

Regards,

Gerard


highandstoned :netherlands: (BOB member since 2005-08-01)

Hello H&S,

thanks again for looking deeper into this … I still haven’t been able to make it work on my side so I was very happy to see your post. I tried your syntax but that failed again :hb: … who knows why? … I am using WebI 6.1a (or was it b?) so a version earlier that yours which would explain the difference in available functions and syntax (well, hardly but anyway …)

So, I am back at using if(myobject In (myvalues);“yes”;“no”)

but it keeps on refusing to accept whatever syntax I use! … and I tried without the quotes in the hope it would work as it did for you - but no such luck!

thanks,

leroyb


leroyb (BOB member since 2004-02-16)

Hi,

perhaps it’s version 6.1 which is different, don’t know. What’s the exact error message it’s displaying ? (and is there no InList in the available operators list ?).
Otherwise, you’re probably going to have to create it at universe level…or something like if([fruit] = “apple” or [fruit] = “lemon”;“yes”;“no”)

Regards,

Gerard


highandstoned :netherlands: (BOB member since 2005-08-01)

6.1 does not have an InList operator in the WebI Reporter module. 6.5 does have this.

The ‘In’ operator you see in 6.1 is not for lists it’s for variable context, just like in the client.

No workaround; upgrade. 6.1 sucks. 6.5 is great.


Steve Krandel :us: (BOB member since 2002-06-25)

Thanks for letting us know Steve! … I can finally leave that wall alone and find something to cure my headache! …

regards,

leroyb


leroyb (BOB member since 2004-02-16)

No workaround ?? InList is nothing different from a=1 or a=2 or a=3 etc…

But, I agree with sucks…but hey, when you’re upgrading goto Xi R2…talking about great… 8)

Regards,

Gerard


highandstoned :netherlands: (BOB member since 2005-08-01)

We’d already been given the “workaround” of using OR clauses. What I meant was that there was no sense trying more ways of using In or InList as they simply would not work.

Good catch!


Steve Krandel :us: (BOB member since 2002-06-25)

Hi ,

I am trying to find the common values on a merged dimension. Say the dimension name is ‘Accounts’ , how would I display the same/different values ?

= If ([Query1].[Accounts] Inlist [Query2].[Accounts] ; “Same Account”;“Different Account”)

I need to populate a separate column , with “Same Account” or “Different Account” depending on the values from Query 1 and Query 2.

Please help.


kiruthika :india: (BOB member since 2007-04-26)