Page 127 - DCAP606_BUSINESS_INTELLIGENCE
P. 127
Business Intelligence
Notes source definition, you should specify an attachment string and credentials so that you can get
access to the data source from your client computer.
Did u know? You can create embedded data source definition for use by a single report or
a shared data source definition that can be utilised by multiple reports.
The methods in this topic recount how to create an embedded data source. To create an embedded
Microsoft SQL Server Analysis Services data source:
1. On the toolbar in the Report Data pane, click New, and then click Data Source.
2. In the Data Source Properties dialog box, type a name in the Name text box, or accept the
default name.
3. Verify that Embedded connection is selected.
4. From the Type drop-down list, select Microsoft Sql Server Analysis Services.
5. Specify a connection string that works with your Analysis Services data source. Contact
your database administrator for connection information and for the credentials to use to
connect to the data source. The following connection string example specifies the
AdventureWorksDW database on the local client:
Data Source = local host; Initial Catalog = Adventure Works DW
6. Click Credentials and then Click OK. The data source appears in the Report Data pane.
8.4 Calculation Scripting
A script command is an MDX script, included as part of the definition of the cube. Script commands
let you perform almost any action that is supported by MDX on a cube, such as scoping a
calculation to apply to only part of the cube. In SQL Server 2005 Analysis Services (SSAS), MDX
scripts can apply either to the whole cube or to specific sections of the cube, at specific points
throughout the execution of the script. The default script command, which is the CALCULATE
statement, populates cells in the cube with aggregated data based on the default scope.
The default scope is the whole cube, but you can define a more limited scope, known as a
subcube, and then apply an MDX script to only that particular cube space. The SCOPE statement
defines the scope of all subsequent MDX expressions and statements in the calculation script
until the scope is terminated or redefined. The THIS statement is then used to apply an MDX
expression to the current scope. You can use the BACK_COLOR statement to specify a background
cell colour for the cells in the current scope, to help you during debugging.
Types of MDX Scripts
There are two types of MDX scripts:
1. The default MDX script: At the time that you create a cube, Analysis Services creates a
default MDX script for that cube. This script defines a calculation pass for the whole cube.
2. User-defined MDX script: After you have created a cube, you can add user-defined MDX
scripts that extend the calculation capabilities of the cube.
Task “Script commands let you perform almost any action that is supported by MDX on
a cube”. Comment.
122 LOVELY PROFESSIONAL UNIVERSITY