Doctorj77
Doctorj77

Reputation: 125

Business Objects - New 'InList' Variable (Help Needed)

I'm using SAP BusinessObjects Web Intelligence 14.0.6, and am having trouble figuring out how to create a InList variable, that will replace multiple values of one column, with replacement values I want it to display. I remember in old BO WebInel XI, there was a feature to keep adding a level to the variable. I don't see that in this version maybe

What I'm trying to do, is create a new variable called 'Region' that will replace certain values in a column called 'Site'. Example:

SITE: Hong Kong, Bangkok, Hanoi, California, Miami, Berlin, Paris

What I want is to have the variable called Region, replace these values with selected values in Example:

REGION: AP, AP, AP, NA, NA, EU, EU

Its been years since I used BO, so I'm very rusty at this part. I know it can be done, cause I done it before, but this new version I'm a little clueless.

Upvotes: 0

Views: 26555

Answers (2)

Praveen
Praveen

Reputation: 2177

I was trying to use InList and the above formula does not work. I changed the single quote to double quote and comma to semicolon ( as mentioned here https://bi.emea.nsn-net.net/BOE/portal/123/AnalyticalReporting/help/en/frameset.htm?471c17396e041014910aba7db0e91070.html)

=If [Site] InList("Hong Kong"; "Bangkok"; "Hanoi") Then "AP"
    ElseIf [Site] InList("California" ; "Miami") Then "NA"
    ElseIf [Site] InList("Berlin", "Paris") Then "EU"

Upvotes: 2

DocZerø
DocZerø

Reputation: 8567

The formula you want to use is:

=If [Site] InList('Hong Kong', 'Bangkok', 'Hanoi') Then 'AP'
ElseIf [Site] InList('California', 'Miami') Then 'NA'
ElseIf [Site] InList('Berlin', 'Paris') Then 'EU'

If [Site] contains a value different from the ones you mentioned, no value will be returned (NULL).

If you append the following to the formula:

Else 'Unknown'

... then Unknown will be shown if it the [Site]'s value isn't in the list.

If you want to find out more information regarding the formula's available, have a look at the manual Using Functions, Formulas and Calculations in SAP BusinessObjects Web Intelligence 4.0 SP5.

Upvotes: 3

Related Questions