Creating a variable similar to an IF-THEN-ELSE statement in Web Intelligence
| The information in the article applies to |
| Synopsis |
How can you create a variable whose output is similar to an IF-THEN-ELSE statement?
| Solution |
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!
