Database Reference
In-Depth Information
12.
From the
To o l b o x
tab of the
Insertable Objects
pane, drag a
Data Item
object into the
Data Items
pane.
The Data Item Expression dialog box is displayed.
13.
Using items from the
Data Items
tab on the
Av a i l a b l e C o m p o n e n t s
pane, add the fol-
lowing expression in the
Expression Definition
pane:
[Return quantity] / [Quantity]
14.
Va l i d a t e t h e e x p r e s s i o n a n d c l i c k
OK
to close the dialog box.
15.
In the
Properties
pane, change the
Name
property to
Return/Ship Ratio
.
16.
Change the
Aggregate Function
property to
Calculated
.
17.
From the
Run
menu, select
View Tabular Data
to test your query.
Yo u r r e s u l t s s h o u l d b e s i m i l a r t o t h o s e s h o w n i n F i g u r e 6 . 2 9 .
18.
Close
IBM Cognos Viewer
to return to your report design.
Figure 6.29
Returned/shipped ratio query results
Step 6: Set Up the Returns by Product Line Query
This query will count the number of items returned by both the product line and the reason that the
customer returned the item. This will be displayed in the new type of pie chart on the dashboard.
1.
In the
Explorer Bar
, mouse over the
Query Explorer
tab and select the
Queries
folder.
2.
Rename
Query2
to
Returns_by_Product_Line
.
3.
Double-click on the query to open the query definition.