Professional Documents
Culture Documents
By William Pearson
Server Requirements
Client Requirements
Sample Files
For purposes of the practice exercises within this series, we will be working with samples that are
provided with MSSQL Server 2005. The samples with which we are concerned include, predominantly,
the Adventure Works DW database. This database and companion samples are not installed by
default in MSSQL Server 2005. The samples can be installed during Setup, or at any time after
MSSQL Server has been installed.
The topics "Running Setup to Install AdventureWorks Sample Databases and Samples" in SQL
Server Setup Help or "Installing AdventureWorks Sample Databases and Samples" in the
Books Online (both of which are included on the installation CD(s), and are available from
www.Microsoft.com and other sources, as well), provide guidance on samples installation. Important
information regarding the rights / privileges required to accomplish samples installation, as well as to
access the samples once installed, is included in these references.
Note: Current Service Pack updates are assumed for the operating system, along with the
applications and components listed above and the related Books Online and Samples. Images are
from a Windows 2003 Server environment, but the steps performed in the articles, together with the
views that result, will be quite similar within any environment that supports MSSQL Server 2005 and
its component applications.
Overview
Among the many powerful new features that appear within MSSQL Server 2005 Analysis Services
("Analysis Services"), Key Performance Indicators ("KPIs") are yet another of the "gap closers"
between the Microsoft integrated business intelligence solution (consisting of MSSQL Server Database
Engine, Analysis Services, Integration Services, and Reporting Services) and the formerly
dominant enterprise BI suites (such as Cognos, BO, MicroStrategy, etc.). As we shall see, we are not
limited to using KPIs within Analysis Services, and can thus enjoy even more flexibility with these
highly customizable components.
NOTE: For detailed information about Analysis Services 2005 KPIs, see my introductory article
Mastering Enterprise BI: Introduction to Key Performance Indicators, a part of the
Introduction to MSSQL Server Analysis Services series at Database Journal.
In this article, we will focus largely upon the use of Analysis Services KPIs within Reporting
Services. We will discuss the general use of KPIs, and then move directly into preparing a scenario
within which we use KPIs that exist in an Analysis Services cube, presenting them within a report we
create within Reporting Services. As a part of our examination of the steps involved in making KPIs
work within Reporting Services, we will:
Hands-On Procedure
We will begin by creating a new Report Server Project, within the SQL Server Business
Intelligence Development Studio, wherein we will establish a Data Source pointed to a database
sample provided with MSSQL Server 2005. This way, anyone with access to the installed application
set and its samples can complete the steps in the practice session.
NOTE: For more exposure to the MSSQL Server Business Intelligence Development Studio itself,
and the myriad design, development and other evolutions we can perform within this powerful
interface, see other articles in this series, as well as in another of my Database Journal series,
Introduction to MSSQL Server Analysis Services. In this article, we will be commenting only on the
Studio features relevant to our immediate practice exercise, to allow us to get to the focus of our
session more efficiently.
Preparation
Create a New Analysis Services Project within a New Solution
For purposes of our practice session, we will create a copy of the Adventure Works Analysis
Services project, one of several samples that are available with (and installable separately from) the
Microsoft SQL Server 2005 integrated business intelligence solution. Creating a "clone" of the project
means we can make changes to select contents while retaining the original sample in a pristine state
perhaps for other purposes, such as using it to accompany relevant sections of the Books Online, and
other documentation, as a part of learning more about Analysis Services and other components of
the Microsoft integrated business intelligence solution in general.
While the preparation might seem cumbersome, creating all the objects to get us to the point of
working with KPIs would require far too many steps to be practical in an article of this size. By using
existing project samples (particularly an Analysis Services project that already has KPIs created),
and a modified copy of a sample report, we can get a "head start" on solution creation, so that we can
get to the focus matter of our session, KPI reporting. Though the steps are numerous, making
preparatory modifications, and then making the enhancements to the solution to add the functionality
to support the subject of our lesson, can be done easily within the Business Intelligence Studio
environment. The end result of our efforts will be to leave us a working example of the specific
approach we took, with all the "working parts" in place, to which we can refer in our individual business
environments.
To begin, 'we will launch the SQL Server Business Intelligence Development Studio.
1. Click Start.
2. Navigate to, and click, the SQL Server Business Intelligence Development Studio, as
appropriate.
The equivalent on my PC appears as depicted in Illustration 1.
We briefly see a splash page that lists the components installed on the PC, and then Visual Studio
.NET 2005 opens at the Start page.
3. Close the Start page, if desired.
4. Select File --> Open from the main menu.
5. Click Project / Solution ... from the cascading menu, as shown in Illustration 2.
9. Navigate, from within the Open Project dialog box, to the location of preference for storing the
folder we have copied, and from which we will create our clone project.
10. Upon arrival within the desired folder, right-click the area within the folder.
11. Select Paste from the context menu that appears, as shown in Illustration 4.
Illustration 4: Pasting the Copy of the Enterprise Project Folder in a Selected Location
The Enterprise folder appears, via the Open Project dialog, in the new location, as depicted in
Illustration 5.
12. Right-click the Enterprise folder, within the Open Project dialog.
13. Select Rename from the context menu that appears, as shown in Illustration 6.
14. Type the following replacement name into the folder's activated caption box:
RS029 MSAS KPIs in ReportServices
15. Click outside the caption box to accept the new name, which then appears as depicted in
Illustration 7.
17. Select the Adventure Works.sln file, and then click the Open button, as shown in Illustration
8.
The Adventure Works solution opens, complete with Adventure Works DW Analysis Services
project, and we see the various associated objects appear in Solution Explorer, as depicted in
Illustration 9.
Illustration 9: The New Solution, Project and Objects within the Solution Explorer
Illustration 10: The Data Source Designer with Default Settings ...
We note that the default Server name is "localhost." While this might prove an adequate setting for a
PC with only MSSQL Server 2005 installed (default instance), in the case of many of our installations,
the requirement here is for the server / instance combination that correctly identifies the correct
MSSQL Server 2005 instance. (Clicking the Test Connection button at this point will provide
confirmation whether we need to make this change).
3. If appropriate, type the correct server / instance name into the Server name box of the
Connection Manager. (Mine is MOTHER1\MSSQL2K5, as shown in Illustration 12.)
4. Ensure that authentication settings are correct for the local environment.
5. Click the Test Connection button.
A Connection Manager message box appears, indicating that the Test connection succeeded,
assuming that our changes (or lack of same, as appropriate) are proper. The message box appears as
depicted in Illustration 13.
Illustration 14: The Data Source Designer with Modified Settings ...
8. Click OK to close the Data Source Designer, and to return to the development environment.
Deploy the Analysis Services Project
Before going further, let's deploy our Analysis Services project to ensure that we are all "in the same
place" with regard to its status. This will ensure issue-free access for Reporting Services as we
progress within our practice preparation and procedures.
1. Right-click the Adventure Works DW Analysis Services project in the Solution Explorer.
2. Select Deploy from the context menu that appears, as depicted in Illustration 15.
The Build and Deployment processes get underway, as we note the Deployment Progress window
appears (by default underneath the Solution Explorer, in the bottom right corner of the development
environment.)
NOTE: Be sure to properly configure Properties of the Analysis Services project to ensure that these
processes can occur. For more information on configuration, and guidance for settings in the local
environment, see the appropriate references in the MSSQL Server 2005 Books Online.
The Build and Deployment processes continue, as each event is logged in the Deployment
Progress window. Finally, the processes complete, and we see the Deployment Completed
Successfully status announced, as shown in Illustration 16.
We are now ready to "clone" a sample report project and proceed with the practice exercise. To prepare
for this, we will add a new Report Server project to our existing solution.
Add a New Reporting Services Project
Much in the same manner that we cloned the Adventure Works project, we will add a copy of an
existing Report Server project, together with its sample reports, primarily to save time in getting to
the focus of our session, working with KPIs within Reporting Services
1. Right-click the Solution 'Adventure Works level, atop the tree within the Solution Explorer.
2. Select Add --> Existing Project ... from the cascading context menus that appear, as depicted in
Illustration 17.
6. Navigate back into the RS029 MSAS KPIs in ReportServices folder, which contains the Analysis
Services project clone we created earlier.
7. Right-click the area within the folder, as we did earlier.
8. Select Paste from the context menu that appears, as depicted in Illustration 19.
Illustration 19: Pasting the Sample Folder in the RS029 MSAS KPIs in ReportServices Folder
The AdventureWorks Sample Reports folder appears, via the Add Existing Project dialog, in the
new location, as shown in Illustration 20.
Illustration 20: AdventureWorks Sample Reports Folder in Its New Location ...
11. Click Open to add the Report Server project to our solution.
The AdventureWorks Sample Reports project appears, with associated objects, in Solution
Explorer, as shown in Illustration 22.
Illustration 22: The New Solution, Project and Objects within the Solution Explorer
While we have saved many steps with our cloning approach, we still have to ascertain connectivity with
the Analysis Services data source, just as we did with the relational data source earlier.
Ascertain Connectivity of the Analysis Services Shared Data Source
Let's ensure we have a working shared data source to facilitate reporting from our Analysis
Services cube, Adventure Works, for the same reason that we noted when completing this step for
the relational data source: Because many of us will be running "side-by-side" installations of
MSSQL Server 2000 and MSSQL Server 2005. Our installation of the latter will need to be
referenced as a server / instance combination, versus a server name alone, (the default for
Analysis Services data source within the Adventure Works Sample Reports project is (local)).
We may also need to "repoint" the data source to the Adventure Works Analysis Services database
contained within our new solution.
1. Double-click the second of the two shared data sources within the Adventure Works Sample
Reports project, AdventureWorksAS.rds, as depicted in Illustration 23.
Illustration 23: Open the Shared Data Source Dialog for the Analysis Services Data Source ...
The Shared Data Source dialog opens, defaulted to the General tab, and appears with default
settings as shown in Illustration 24.
Illustration 24: The Shared Data Source Dialog with Default Settings ...
Illustration 25: The Connection Properties Dialog with Default Settings ...
We note that the default Server name is "(local)," once again. While this might prove an adequate
setting for a PC with only MSSQL Server 2005 installed (default instance), in the case of many of our
installations, the requirement here is for the server / instance combination that correctly identifies
the correct MSSQL Server 2005 instance. (Clicking the Test Connection button at this point will,
again, provide confirmation whether we need to make this change).
3. If appropriate, type the correct server / instance name into the Server name box of the
Connection Properties dialog. (Mine is MOTHER1\MSSQL2K5, as before).
4. In the Connect to a database section in the bottom half of the dialog, in the selector box labeled
Select or enter a database name, select Adventure Works DW.
The Connection Properties dialog appears, with our setting modifications, as shown in Illustration
26.
Illustration 26: The Connection Properties Dialog with Modified Settings ...
5. Ensure that authentication settings are correct for the local environment, as we did for the
relational data source above
6. Click the Test Connection button.
A message box appears, indicating that the Test connection succeeded, assuming that our changes
(or lack of same, as appropriate) are appropriate. The message box appears as depicted in
Illustration 27.
Illustration 28: The Shared Data Source Dialog with Modified Settings ...
9. Click OK to close the Shared Data Source dialog, and to return to the development environment.
We are now ready to modify a sample report and proceed with some exposure to KPIs in Reporting
Services.
Modify the OLAP Report to Work with Our Cube
When we copied the installed sample reports into our new project folder, we insulated the originals from
modification, to allow their continued use with the tutorial that ships with Reporting Services, as well
as within other training endeavors. In this session, we will work only with the OLAP report member of
the report set in our project, Sales Reason Comparisons.rdl.
Let's make some modifications to the report to render it more useful to our present focus. First, we will
recreate the report and give it a new name. We will then be ready to concentrate on using KPIs within
the report in a useful way.
1. In Solution Explorer, right-click the Reports folder, within the AdventureWorks Sample
Reports project that we added earlier
2. Select Add from the context menu that appears.
3. Select Existing Item ... from the context menu that cascades from the first, as depicted in
Illustration 29.
4. Within the Add Existing Item dialog that appears (it should open to reveal the contents of our
newly copied AdventureWorks Sample Reports folder), right-click the Sales Reason
Comparisons.rdl file.
5. Select Copy from the context menu that appears, as we have done with other objects in previous
sections.
6. Right-click elsewhere in the empty space of the folder.
7. Select Paste, once again, to create a duplicate of the selected object.
8. Right-click the new file, named Copy of Sales Reason Comparisons.rdl, by default.
9. Select Rename from the context menu that appears, as we have done with other objects earlier.
10. Rename the file to the following:
Analysis Services KPIs.rdl
11. Select the newly renamed file within the Add Existing Item dialog.
12. Click Add to add the new file to the AdventureWorks Sample Reports project in Business
Intelligence Development Studio, as shown in Illustration 30.
Illustration 30: Adding the New Report to the Report Server Project ...
Having determined that all is "wired correctly," we are ready to add KPIs to our report.
Procedure
Reporting with Analysis Services KPIs
Add KPI Values to the Report
Our clone of the Sales Reason Comparisons report, the sole OLAP report in the sample set, will serve
as a quick "framework," since it is already in place and has several attributes that will allow us to
modify it quickly. We can then add KPI values.
1. Click the Data tab to return to Data view.
We arrive at the MDX Query Designer, where we will be working in Design View for this part of our
session.
2. Select the sole item (Product) in the Filter pane, in the upper right corner of the Query
Designer.
3. Click the Delete button to remove the filter, as shown in Illustration 32.
The filter disappears, and the grid updates (unless Auto Execute is disabled) in the Results pane
below.
4. Right click a point with the Results pane.
5. Select Clear Grid to begin a fresh start with the DataSet, as depicted in Illustration 33.
6. In the Metadata Browser pane, expand the Product dimension in the metadata tree by clicking
the "+" sign to its immediate left.
7. Drag the Subcategory attribute from the Metadata Browser pane over to drop on the main
Results pane, as shown in Illustration 34.
We see that the KPI, which represents a collection of calculations that we can use to support decisions
and evaluate success, and which are associated with a given measure group (or, alternatively, all
measure groups) within the cube, has brought along four separate members. The member
components of the Internet Revenue KPI are as follows:
Value an MDX numeric expression that returns the actual value of the KPI.
Goal - an MDX numeric expression that typically returns the targeted (budgeted, forecast, etc.)
value of the KPI.
Status - an MDX expression representing the state of the KPI at a specified point in time. The
Status expression returns normalized values: a "-1" (interpreted as "bad" or "low"), a "0"
(interpreted as "acceptable" or "medium," etc.) or a "1" (interpreted as "good" or "high").
Trend - an MDX expression evaluating the value of the KPI over time. The Trend allows
information consumers to ascertain progress / improvement or lack of same over any businessrelevant, time-based criterion.
The Goal and Value components are typically the most significant and common, although Status and
Trend, which are based upon Goal and Value, are often in demand, as well. Other calculations are
available besides the above examples. For an in-depth discussion of Analysis Services 2005 KPIs,
see my article Mastering Enterprise BI: Introduction to Key Performance Indicators.
Let's add a couple of filters at this point. While we might select multiple years' operations for analysis,
we will limit our practice report to Fiscal Year 2004. In addition, we will filter our null values to
generate a more compact report.
10. In the Filter pane, select Date in the Dimension selector.
11. Select Date.Fiscal Year in the Hierarchy selector of the Filter pane, as depicted in Illustration
36.
The Filter pane, with our selections, appears as depicted in Illustration 38.
We are now ready to modify the matrix data region on the Layout tab, where the layout remains the
same even though we have effectively redesigned the underlying DataSet.
14. Click the Layout tab.
15. Select the left-most Data field within the matrix to select it, as shown in Illustration 39.
The second Data field (along with the respective column) disappears and the third Data field clears,
leaving the Data watermark exposed, as depicted in Illustration 40.
Next, we will eliminate the Report Parameter for Product Category (which referenced the Product
filter we removed earlier in the Filter pane of the Data tab.)
18. Select Report --> Report Parameters ... from the main menu, as shown in Illustration 41.
Illustration 41: Select Report --> Report Parameter from the Main Menu
19. Select the sole Product Category parameter appearing in the Parameters list on the left side of
the Report Parameters dialog, which appears next.
20. Click the Remove button underneath the Parameters list, as depicted in Illustration 42.
21. Click OK to accept the modification and dismiss the Report Parameters dialog.
We return to the Layout tab. Next, we will modify some properties of the matrix data region.
22. Click any point within the matrix to cause its gray header and row borders to appear.
23. Right-click the upper left corner of the matrix, as shown in Illustration 43.
24. Select Properties from the context menu that appears (the gray borders disappear, and the
matrix data region assumes a semi-transparent outline), as depicted in Illustration 44.
in
the
top
half
of
the
Groups
tab,
The Grouping and Sorting dialog opens, defaulted to the General tab.
28. Replace the contents of the Name field with the following:
matrix1_ProductSubcategory
select
the
sole
group
29. In the Group on section, select the following to replace the current contents of the top row of the
Expression list:
=Fields!Subcategory.Value
The Grouping and Sorting dialog - General tab appears as depicted in Illustration 46.
Illustration 46: Grouping and Sorting Dialog for Row Group with Modifications
30. Click OK to accept the modifications and to return to the Matrix Properties dialog Groups tab.
31. In the Columns list in the bottom half of the Groups tab, select the middle group
(matrix1_Sales_Territory_Group).
32. Click the Delete button, as shown in Illustration 47.
The Matrix Properties dialog - Groups tab appears, with our modifications, as depicted in
Illustration 48.
33. Click OK to accept our changes, and to return to the Layout tab.
34. Right-click the textbox for the Rows group, currently containing the expression "=Fields!
Sales_Reason.Value."
35. Select Expression from the context menu that appears, as shown in Illustration 49.
Illustration 49: Modifying the Expression for the Rows Group Textbox
36. Replace the current occupant of the Expression box, atop the Expression Editor that appears
next, with the following:
=Fields!Subcategory.Value
The Expression Editor, with our new expression, appears as depicted in Illustration 50.
37. Click OK to accept the new expression and to dismiss the Expression Editor.
38. Right-click the column label textbox, currently labeled Sales Reason, above the Rows group
textbox.
39. Select Expression ... from the context menu, once again.
40. Replace the current occupant of the Expression box, again atop the Expression Editor that
appears next, with the following:
=""& vbcrlf & vbcrlf &" Product Subcategory"
The Expression Editor, with our new expression, appears as shown in Illustration 51.
41. Click OK to accept the new expression and to dismiss the Expression Editor.
We are now ready to bring the KPI values into the matrix from Datasets window, where they currently
appear as fields.
42. Open the Datasets window with the tab to the left of the Layout tab, as depicted in Illustration
52.
NOTE: If the tab is not in its default position, open the window by selecting View ---> Datasets, as
shown in Illustration 53.
Illustration 53: Select View --> Datasets to Resurrect the Datasets Window, if Required
43. Within the Datasets window, expand the ProductData Report Dataset, so that all four Internet
Sales KPI members are exposed.
44. Drag the Internet Revenue Status field from the Datasets window to the empty Data field
within the matrix data region, on the canvas in Layout view, as depicted in Illustration 54.
Illustration 54: Adding the KPI Field to the Matrix Data Region
45. Drag the Internet Revenue Trend field from the Datasets window to the immediate right of the
Data field into which we dropped the Internet Revenue Status field in the last step. The right border
of the b field will assume a white bracket shape when the positioning is correct to drop the field and
create a new column, as shown in Illustration 55.
Illustration 55: The Right Border Indicates that the Drop Point is Correct for a New Column ...
A new Data field / column is created when we drop the Internet Revenue Trend field to the
immediate right of the Internet Revenue Status field.
46. In like manner, drag the Internet Sales Amount field from the Datasets window to the
immediate right of the Data field into which we dropped the Internet Revenue Trend field.
47. Finally, drag the Internet Revenue Goal field from the Datasets window to the immediate right
of the Internet Sales Amount field.
48. Right-click the left most Data column heading in the matrix data region (currently labeled
Internet Total Product Cost).
49. Select Expression... from the context menu that appears, as depicted in Illustration 56.
50. Within the expression box at the top of the Expression Editor, replace the existing expression
with the following:
Internet Revenue Status
51. Click OK to accept the modification and dismiss the Expression Editor.
52. Holding down the SHIFT key, click the Data column heading for each of the four new Data fields,
to select them simultaneously.
53. Click the Center alignment button in the toolbar, as depicted in Illustration 57.
54. Finally, right-click the Internet Sales Amount Data field (the Data field to the immediate left of
the far right field).
55. Select Properties from the context menu that appears, as shown in Illustration 58.
58. Click OK to accept the change and to close the Textbox Properties dialog.
59. Perform the same Format setting accomplished in the last few steps for the far right Data field,
Internet Revenue Goal.
60. Holding down the SHIFT key, once again, click the Row group label textbox (containing "=Fields!
Subcategory.Value" ) and the data textboxes for each of the four new Data fields, to select them
simultaneously, as we did earlier with their column heading textboxes.
61. Select 9 in the Font Size selector, on the left side of the Report Formatting toolbar (which we
accessed earlier for the Center button, when aligning the column headings), atop the design
environment, as shown in Illustration 60.
Illustration 60: Slightly Reducing the Font for the Data Fields ...
The Analysis Services KPIs report, in Layout view, with our KPI and column label additions, appears
as depicted in Illustration 61.
A cursory review of the report's pages reveals that the sample data appears to match Internet Sales
Amount with Internet Revenue Goal in every case where we have a non-zero number. This is not
surprising for a sample data set, but we are not impaired in our immediate pursuits, as we have
occurrences of -1, 0, and 1 throughout the report. We will not delve into the KPIs themselves at this
point we have what we need to move to the next (and concluding) section.
63. Return to the Layout tab.
Drive Indicators with KPI Values in the Report
I mentioned earlier that KPIs typically wind up in graphical form to summarize, at a glance, a status,
trend, or other condition (usually in a balanced scorecard, digital dashboard, or similar presentation
backdrop). We have been able to pull in the numerical values of the KPIs, but Analysis Services does
not expose a direct means of presenting the KPI graphics that exist within Analysis Services (that
is, there are no report items that are included to do this, etc.)
We can still obtain an identical presentation effect in Reporting Services. We just have to supply our
own graphics. Working with Cognos and other enterprise BI suites over the years, particularly at the
point, and beyond, where all were venturing into web presentation and delivery, I often used the easily
accessible image files included with the applications to achieve my own ends (I often simply wanted to
replace them with my own or client images, such as corporate logos, etc., to customize the appearance
of the reports and other displays we presented via the internet / intranets). We can do something
similar with the images that are included to support Reporting Services' KPIs. We can simply use
conditional logic to turn all those 1's, 0's, and -1's into a corresponding image.
Let's put the same reasoning to work in our Analysis Services KPIs report by taking the following
steps:
1. Drag an Image report item from the Toolbox into the Data field with the column label Internet
Revenue Status, as depicted in Illustration 63.
The Welcome to the Image Wizard page of the Image Wizard appears, as shown in Illustration
64.
The image files were put in place to support the KPI Browser in Analysis Services, and will serve as
a handy source of image files for this practice session. (We can certainly use other images, if they are
accessible, and of an acceptable format, size, and so forth to be used by Reporting Services.) The
Images folder is installed, by default (and, therefore, subject to be installed in a different location on
our individual machines), in the following location:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\
DataWarehouseDesigner\KPIsBrowserPage\
7. From inside the Import Image dialog, right-click the Images folder within the KPIsBrowserPage
folder.
8. Select Copy from the context menu that appears, as shown in Illustration 66.
9. Navigate back to the RS029 MSAS KPIs in ReportServices folder, which contains the Analysis
Services and Reporting Services project clones we created earlier.
10. Right-click the area within the folder, as we did earlier.
11. Select Paste from the context menu that appears, as depicted in Illustration 67.
Illustration 67: Pasting the Sample Folder in the RS029 MSAS KPIs in ReportServices Folder
Illustration 68: KPI Image Collection Folder in Its New Location ...
17. Click Open to add the specified image file to our report.
The Import Image dialog closes, and we see the image file rendered within the viewer of the Choose
the Embedded Image page.
18. Click the New Image button again.
19. Select the Stoplight_Multiple1.gif (the "yellow light") file.
20. Click Open to add the specified image file to the report.
We see the second image rendered within the viewer of the Choose the Embedded Image page.
21. After the same fashion with which we have added the two images above, add the following
additional images to the report.
Stoplight_Multiple2.gif
Arrow_Status_Asc0.gif
Arrow_Status_Asc2.gif
Arrow_Status_Asc4.gif
Once our additions are complete, the acquired images appear within the viewer of the Choose the
Embedded Image page.
22. Ensure that the first image we added, Stoplight_Multiple0.gif (the "red light") is selected.
Our selection (circled), atop the other KPI images, appears within the viewer of the Choose the
Embedded Image page as shown in Illustration 70.
Illustration 70: New Image Acquisitions Appear in the Choose the Embedded Image Page (Partial View)
23. Click Next to accept our image choice, and to continue with the Image Wizard.
We arrive at the Completing the Wizard page, which affords us an opportunity to confirm our
selection, as depicted in Illustration 71.
24. Click Finish to place the image in the Data field, and to dismiss the Image Wizard.
"Grab" the bottom border of the bottom row in the matrix data region, using the cursor on the
bottom left corner of the gray area, and increase the height of the row (I gave it a height of 2 in.)
enough to easily accommodate the image we have placed in the data field, as shown in Illustration
72.
Previewing the report at this juncture would mean we see the "red light" in every data field in the
column. This is where conditional formatting comes in.
25. Click the image to select it.
26. Select <Expression ...> in the selector for the Value property, within the Properties window for
the image, as depicted in Illustration 73.
Illustration 73: Select <Expression...> to Replace the Value Property in the Properties Window
=IIF(Fields!Internet_Revenue_Status_.Value = -1,
"stoplight_multiple0",
IIF(Fields!Internet_Revenue_Status_.Value = 0,
"stoplight_multiple1",
"stoplight_multiple2")
)
The Expression Editor, with our expression in place, appears as shown in Illustration 74.
Illustration
75:
(Partial View)
Our
New
Image
Selection
in
the
Choose
the
Embedded
Image
Page
34. Click Next to accept additions and continue with the Image Wizard.
We arrive at the Completing the Wizard page, which affords us an opportunity to confirm our
selection, once again.
35. Click Finish on the Completing the Wizard page to add the image to the report file, and to
dismiss the Image Wizard.
Adding the conditional expression is all that remains:
36. Click the image to select it.
37. Select <Expression ...> in the selector for the Value property, within the Properties window for
the image, as we did with the first image.
The Expression Editor opens.
38. Replace arrow_status_asc4, which currently appears in the Expression box of the Editor, with
the following expression:
=IIF(Fields!Internet_Revenue_Trend.Value = -1,
" arrow_status_asc0",
IIF(Fields!Internet_Revenue_Trend.Value = 0,
" arrow_status_asc2",
" arrow_status_asc4")
)
The Expression Editor, with our expression in place, appears as shown in Illustration 76.
Illustration 77: KPIs at Work in the Analysis Services KPIs Report ...
We could certainly have obtained artwork that was more fitly sized, and perhaps a data set with a bit
more diversity, which might have produced the full spectrum of Status and Trend KPI values.
Regardless, the concepts are the same, particularly in any scenario where we undertake to generate
graphics to represent Analysis Services KPIs in Reporting Services, rather than remaining limited
to their use within the Analysis Services KPI Browser.
1. Select File --> Save All on the main menu, to save our work to this point.
2. Select File --> Exit, to leave the Business Intelligence Development Studio, when ready.
Conclusion ...
In this article, we introduced another powerful new tool that makes its debut with MSSQL Server
Analysis Services 2005, Key Performance Indicators ("KPIs"). Key Performance Indicators
close yet another "out-of-the-box" capabilities gap between the Microsoft integrated business
intelligence solution and the formerly dominant enterprise BI suites. We discussed the purpose and
uses of KPIs, and stated that, although these indicators originate in Analysis Services, and are
typically viewed therein via an internal browser, we are not limited to accessing and using KPIs within
Analysis Services. The focus of this article was to show how we can flexibly present KPIs within
Reporting Services to support decision making, analysis and reporting.
After initially discussing Analysis Services KPIs, we shifted to the focus of our hands-on practice
session, surrounding the use of the indicators within a report we created in Reporting Services. In
preparation, we created a new Analysis Services Project within the Business Intelligence
Development Studio Solution, to which we added a new Reporting Services Project. We ensured
connectivity with the respective data sources involved within the projects, and then modified a sample
OLAP report to work with KPIs found in the sample cube. We next added KPI values to the report.
Finally, we demonstrated an approach for using KPIs to drive graphical indicators in the report.
Throughout the steps of our practice session, we discussed, at appropriate junctures, various settings
and techniques involved in achieving our objectives.