Dataspace

Business Objects Training

October 2008 e-newsletter

tip: Using the If and Match functions to group data values
With the If function in Web Intelligence you can create a variable that will group data values. In our example, we have colors of products and their sales. We are going to group the individual colors into three groups — black, blue and brown. Additionally, we are going to use the Match() function so that we do not have to list the colors individually.

Our current report shows the following data:
Oct tip chart

We want to group the colors into three categories. If the color begins with black then it will be in the black category; if the color begins with blue, it will be in the blue category; and if the color begins with brown, it will be in the brown category.

We will create a new variable. Click the Variable Editor button on the Reporting Toolbar:

The Variable Editor is displayed:

Give the variable a name. In this example, the variable will be named:
v_Color Grouping

We will use the If() function and the Match() function to group our colors.

The syntax for the If() function is:

If ([condition to test]; what to do if the condition is true; what to do if the condition is false)

NOTE: This is sometimes called an If/Then/Else statement.

We are going to use a nested If. This means that for the "false" part of the function we will use another If() statement. And, within the nested If() function, we are going to use the Match() function so that we do not have to specify all of the colors.

The syntax for the Match() function is:

Match([variable name to compare];"string to compare it to")

With the Match() function you have two wildcards available: * and ?

The asterisk (*) replaces one or more characters. The question mark (?) replaces only one character. We will use the asterisk in our variable.

For our variable we will use the following syntax:

=If(Match([Color];"Black*");"Black"; If( Match([Color];"Blue*");"Blue";If (Match([Color];"Brown*");"Brown" )))

Click the checkmark to validate your syntax. Once validated, click OK.

The variable is now listed on the Data tab of the Data Manager and can be used in the report:

rule

Dataspace, in business since 1994, focuses exclusively on business intelligence consulting and education and offers a full spectrum of Business Objects authorized training and consulting services.  For more information call 888 761-6371.

Business Objects Authorized Education Partner

arrow  Contact Us

Making Data Make Sense

Upcoming 2008 Schedule

OCTOBER 17
NEW WEEKEND COURSE!
Web Intelligence XI R1/R2 (QA210R2)

OCTOBER 20
Web Intelligence XI R1/R2 (QA210R2)

OCTOBER 22
Web Intelligence XI R1/R2 Advanced (QA320R2)

OCTOBER 28
Web Intelligence XI R1/R2 (QA210R2)

OCTOBER 30
Web Intelligence XI R1/R2 Advanced (QA320R2)

NOVEMBER 3
Crystal Reports I (RD110R2)

NOVEMBER 10
Desktop Intelligence XI R1/R2 (QA230R2)

NOVEMBER 12
Dashboard Manager XI R1/R2 (PM310R2)

NOVEMBER 17
NEW VERSION 3.0 COURSE!
Web Intelligence XI 3.0 (QA210V3)

NOVEMBER 19
NEW VERSION 3.0 COURSE!
Web Intelligence XI 3.0 Advanced (QA320V3)

DECEMBER 1
BusinessObjects Enterprise XI R1/R2: Administering Users & Content (SA210R2)

DECEMBER 3
BusinessObjects Enterprise XI R1/R2: Administering Servers (SA310R2)

DECEMBER 8
Web Intelligence XI R1/R2 Advanced (QA320R2)

DECEMBER 9
NEW VERSION 3.0 COURSE!
Xcelsius 2008 (XC24008)

On-Demand Training:
If our scheduled training dates don't work for you, call us. Dataspace can schedule new sessions for groups of three or more.

Save the Date!
Save the date for the new Business Objects user annual event:

Business Objects Community
Alliance Annual Conference

October 20-22, 2008
Dallas, Texas


This event is taking the place of Insight and provides three days of top-notch education, networking and product demonstrations.

 

© 2008 Dataspace. Data warehouse and business intelligence consulting. All rights reserved.