| The information in the article refers to |
BusinessObjects
Web Intelligence
In Web Intelligence, you want to create a variable whose output is similar to an IF-THEN-ELSE statement. For example, if a field has a value of 'Canada', the variable should show 'North America'. If the field shows 'Brazil', the variable should show 'South America'.
How can you create a variable whose output is similar to an IF-THEN-ELSE statement?
To create a variable that behaves like an IF-THEN-ELSE statement, use the 'INLIST' operator. INLIST allows you to select the values that you specifically require.
To Demonstrate INLIST:
- In Web Intelligence, create a report based on the 'Xtreme' database. Place the 'Country' object in the report and then preview it.
- Click 'show/hide variable editor'. Assign a name to your variable.
- In the 'Formula Definition', type the following formula: "=If ([Country] InList ("USA";"Canada";"Mexico");"North America";If ([Country] InList ("China";"Japan";"Korea");"Asia";"Other"))"
- Save the formula and close the editor. Your variable now appears under the 'Variables' area on the left.
- Add the variable to the report by placing it next to the 'Country' field.
- Preview the report.
When previewing the report, the variable shows "North America", "Asia", or "Other", depending on the value of the 'Country' field.
Have a question for our trainers?
Click here to send your questions!
|