Documente Academic
Documente Profesional
Documente Cultură
Business Intelligence is built on the scalable and reliable SQL Server 2005
platform, proven to support mission-critical environments, and integrated
with the Microsoft Visual Studio 2005 development platform.
The 2007 Microsoft Office system, delivering information through the
tools that users already know and rely on. Users can share more
powerful, interactive spreadsheets using improved charting and formula
authoring, greater row and column capacity, and enhanced sorting and
filtering along with enhanced PivotTable and PivotChart views. With
server-based spreadsheets, you can share information broadly with
confidence, knowing that your information is more secure and centrally
managed, yet accessible to colleagues, customers, and partners through
the Web. Dynamic scorecards combine the power of predictive analysis
with real-time reporting. Strategy maps make it easy to visualize key
areas you can see trends, identify problem areas early, maximize
success areas, and monitor performance against key goals in real time.
Q. Who is Business Intelligence for?
Business Intelligence is for businesses that want to drive intelligent
decision-making throughout their organizations and make it easy for
everyone in the organization to collaborate, analyze, share, and act on
business information from a centrally managed, more secure source.
Enterprise grade yet attractively priced, Business Intelligence supports IT
professionals, information workers, and developers, and empowers
organizations of all sizes.
Q. What if I have a small (fewer than 100-person) company? Can I still use
Business Intelligence?
Yes. Business Intelligence provides an excellent business intelligence
solution for organizations of all sizes. You can deploy reporting solutions
to a small workgroup or department with SQL Server 2005 Reporting
Services. You can also perform queries and analysis using Excel Services
new to the 2007 release of Microsoft Office through Microsoft Office
SharePoint Server 2007. This combination delivers Web-based query and
analysis capabilities to every user in a format that is easy to use and
centrally secured and managed.
Q. Whats a typical way an organization might use Business Intelligence?
Business Intelligence connects the right people to the right information at
the right time. For example, when reviewing the current financial
scorecard, your sales manager, Margaret, notices that one particular
region is not contributing as much as other regions. When analyzing the
data from the spreadsheet for the low-performing region, she notices that
one particular salesperson, Joe, has below-average sales numbers.
At the same time, Joe receives through e-mail a weekly status report that
contains qualified leads in the region, pipeline information, and details
about deals closed. Next, he opens the dashboard and searches on
information about his top account, and he sees data from his enterprise
resource planning (ERP) system related to that account. Joe notes that his
average deal size is smaller than others in the region. Its easy for Joe to
find out why this is by doing some "what if" analysis. He inputs different
variables to determine the number of leads he needs to reach the
company sales average. Next, by doing further analysis on data for the
region, Joe can compare his sales numbers with regional averages. He
adds more information that shows the discount rate, and then adds
visualization to better understand the results. The visual representation of
the data shows Joe that his discount rate is much lower than the average
for the region.
Next, its time to tell his manager. Joe publishes this information to the
server, schedules a meeting with Margaret to discuss getting approval to
increase the discount rate so that hell be better able to compete, and
alerts Margaret through online collaboration that hes just posted his
analysis report.
Joe and Margaret meet to discuss details. Afterward, he makes a note on
the key performance indicator (KPI) that he owns for that region, and
Margaret sees the annotation in her latest scorecard as a reminder that
theres a new strategy in place to increase Joes results and address the
poor sales performance.
What programs are included in Business Intelligence? Is Business Intelligence
available as a single product in a box?
Business Intelligence includes two major components: the business
intelligence platform (SQL Server 2005) and end-user tools the 2007
Microsoft Office system.
MDX
How do you get Last month in the time dimension
SELECT ClosingPeriod([Date].[Calendar].[Month], [Date].
[Calendar].DefaultMember) ON 0FROM [Sales Summary]WHERE
([Measures].[Sales Amount]);
I Need an MDX statement to show the first day of the last month
in the cube
SELECT OpeningPeriod([Date].[Calendar].[Date], ClosingPeriod([Date].
[Calendar].[Month], [Date].[Calendar].DefaultMember) ) ON 0FROM
[Sales Summary]
I Need an MDX statement to get the last Month loaded into a cube
SELECT ClosingPeriod([Date].[Calendar].[Month], [Date].
[Calendar].DefaultMember) ON 0FROM [Sales Summary];
How do you write MDX query that uses execution date/time as a
parameter?
SELECT {[Measures].[Internet Order Count]} ON 0,
{StrToMember("[Date].[Date].[" + Format(now(), "MMMM dd, yyyy") +
"]")} ON 1FROM [Direct Sales];
Need MDX Query to get latest months and previous years same
months data
SELECT {ClosingPeriod([Date].[Calendar].[Month], [Date].
[Calendar].DefaultMember), ParallelPeriod([Date].[Calendar].[Calendar
Year] , 1, ClosingPeriod([Date].[Calendar].[Month], [Date].
[Calendar].DefaultMember) ) } ON 0
FROM [Sales Summary];
How to create calculated member for AVG sales over last 3 years
based on NOW()?
CREATE MEMBER CurrentCube.Measures.[Avg3Years] AS
Avg( {ParallelPeriod( [Date].[Date].[Date Yr], 3, StrToMember("[Date].
I Need an MDX statement to get the first month of the last year
loaded into a cube
SELECT OpeningPeriod([Date].[Calendar].[Month], ClosingPeriod([Date].
[Calendar].[Calendar Year], [Date].[Calendar].DefaultMember) ) ON
0FROM [Sales Summary];
I need an MDX query to show year level data for all years except
the last one, and month level data for the last year.
SELECT {NULL:ClosingPeriod([Date].[Calendar].[Calendar Year], [Date].
[Calendar].DefaultMember).PrevMember,
DESCENDANTS(ClosingPeriod([Date].[Calendar].[Calendar Year], [Date].
[Calendar].DefaultMember), [Date].[Calendar].[Month]) } ON 0
FROM [Sales Summary];
How do I calculate sales for 12 Month to date in MDX?
WITH MEMBER [Measures].[Last 12 Mth Order Count] AS
SUM( ClosingPeriod([Date].[Calendar].[Month], [Date].[Calendar].[All
Periods]).Lag(12): ClosingPeriod([Date].[Calendar].[Month], [Date].
[Calendar].[All Periods]), [Measures].[Order Count])SELECT [Measures].
[Last 12 Mth Order Count] ON 0
FROM [Adventure Works]
MDX query to get count of months with sales amount > 0 in
defined period
WITH Member [Measures].[Months With Above Zero Sales] AS
COUNT(FILTER( DESCENDANTS({[Date].[Calendar].[Calendar
Year].&[2003]: [Date].[Calendar].[Calendar Year].&[2004]}, [Date].
[Calendar].[Month]) , [Measures].[Sales Amount] > 0 ) )SELECT
{[Measures].[Sales Amount], [Measures].[Months With Above Zero
Sales]} ON 0, [Product].[Product Model Lines].[Product Line].Members on
1FROM [Adventure Works]WHERE ([Date].[Calendar].[Calendar
Year].&[2003]: [Date].[Calendar].[Calendar Year].&[2004]);
'IS' operator:
Example:
WITH MEMBER [Measures].[TimeName] AS
IIF([Date].[Calendar].Level IS [Date].[Calendar].[Calendar
Quarter],'Qtr','Not Qtr')
SELECT [Measures].[TimeName] ON 0
FROM [Sales Summary]
WHERE ([Date].[Calendar].[Calendar Quarter].&[2004]&[3])
Q: MDX query to get sales by product line for specific period plus
number of months with sales
A: Function Count(, ExcludeEmpty) counts number of non empty set
members. So if we crossjoin Month with measure we will get set that we
can use to count members.
Query example:
WITH Member [Measures].[Months With Non Zero Sales] AS
COUNT(CROSSJOIN([Measures].[Sales Amount]
, DESCENDANTS({[Date].[Calendar].[Calendar Year].&[2003]: [Date].
[Calendar].[Calendar Year].&[2004]}, [Date].[Calendar].[Month]))
, ExcludeEmpty
)
SELECT {[Measures].[Sales Amount], [Measures].[Months With Non Zero
Sales]} ON 0
, [Product].[Product Model Lines].[Product Line].Members on 1
FROM [Adventure Works]
WHERE ([Date].[Calendar].[Calendar Year].&[2003]: [Date].[Calendar].
[Calendar Year].&[2004])
Q: How can I setup default dimension member in Calculation
script?
A: You can use ALTER CUBE statement. Syntax:
ALTER CUBE CurrentCube | YourCubeName UPDATE DIMENSION ,
DEFAULT_MEMBER='';
Q: I would like to create MDX calculated measure that instead of
summing children amounts,uses last child amount
A: Normally best way to create this in SSAS 2005 is to create real
measure with aggregation function LastChild. If for some reason you still
, ExcludeEmpty
)
SELECT {[Measures].[Sales Amount], [Measures].[Months With Above
Zero Sales]} ON 0
, [Product].[Product Model Lines].[Product Line].Members on 1
FROM [Adventure Works]
WHERE ([Date].[Calendar].[Calendar Year].&[2003]: [Date].[Calendar].
[Calendar Year].&[2004])
Q: How do I group dimension members dynamically in MDX?
Source: MSDN SSAS Newsgroup.
A: You can create calculated members for dimension and then use them in
the query. Example below will create 3 calculated members based on filter
condition:
WITH MEMBER [Product].[Category].[Case Result 1] AS '
Aggregate(Filter([Product].[Category].[All].children, [Product].
[Category].currentmember.Properties("Key") < "3"))'
MEMBER [Product].[Category].[Case Result 2] AS '
Aggregate(Filter([Product].[Category].[All].children, [Product].
[Category].currentmember.Properties("Key") = "3"))'
MEMBER [Product].[Category].[Case Result 3] AS '
Aggregate(Filter([Product].[Category].[All].children, [Product].
[Category].currentmember.Properties("Key") > "3"))'
SELECT NON EMPTY {[Measures].[Order Count] } ON COLUMNS
, {[Product].[Category].[Case Result 1],[Product].[Category].[Case Result
2],[Product].[Category].[Case Result 3] } ON ROWS
FROM [Adventure Works]
Q: How can I compare members from different dimensions that
have the same key values?
Lets say I have dimensions [Delivery Date] and [Ship Date]. How
can I select just records that were Delivered and Shipped the
same day?
A: You can use FILTER function and compare member keys using
Properties function:
SELECT {[Measures].[Internet Order Count]} ON 0
, FILTER( NonEmptyCrossJoin( [Ship Date].[Date].Children, [Delivery
Date].[Date].Children
)
, [Ship Date].[Date].CurrentMember.Properties('Key')
= [Delivery Date].[Date].Properties('Key')
) ON 1
FROM [Adventure Works]
Q: How can I get attribute key with MDX
A:
To do so, use Member_Key function:
WITH
MEMBER Measures.ProductKey as [Product].[Product
Categories].Currentmember.Member_Key
SELECT {Measures.ProductKey} ON axis(0),
[Product].[Product Categories].Members on axis(1)
FROM [Adventure Works]
Q: How do I create a Rolling 12 Months Accumulated Sum
(InternetSalesAmtR12Acc) that can show a trend without
seasonal variations?
A: Here is query example
WITH MEMBER [Measures].[InternetSalesAmtYTD] AS SUM(YTD([Date].
[Calendar].CurrentMember),[Measures].[Internet Sales Amount]),
Format_String = "### ### ###"
MEMBER [Measures].[InternetSalesAmtPPYTD] AS
SUM(YTD(ParallelPeriod([Date].[Calendar].[Calendar Year],1,[Date].
[Calendar].CurrentMember)),
[Measures].[Internet Sales Amount]), Format_String = "### ### ###"
MEMBER [Measures].[InternetSalesAmtPY] AS
SUM(Ancestor(ParallelPeriod([Date].[Calendar].[Calendar Year],1,[Date].
[Calendar].CurrentMember),[Date].[Calendar].[Calendar Year]),
[Measures].[Internet Sales Amount]),Format_String = "### ### ###"
MEMBER [Measures].[InternetSalesAmtR12Acc] AS ([Measures].
[InternetSalesAmtYTD]+[Measures].[InternetSalesAmtPY] )- [Measures].
[InternetSalesAmtPPYTD]
Select {[Measures].[Internet Sales Amount], Measures.
[InternetSalesAmtYTD], [Measures].[InternetSalesAmtPPYTD],
[Measures].[InternetSalesAmtR12Acc]} On 0,
[Date].[Calendar].[Month].Members On 1
From [Adventure Works]
Where ([Date].[Calendar Year].&[2004]);
Q: How to setup calculated measure as default measure for a
cube?
A: Use ALTER Cube statement on measures dimension. Example:
ALTER CUBE CURRENTCUBE UPDATE DIMENSION Measures,
DEFAULT_MEMBER=[Measures].[Profit]
Q: How can I write MDX query for the count of customers for
whom the earliest sale in the selected time period (2002 and
2003) occurred in a particular Product Category
A: Example of such query:
WITH SET [FirstSales] AS
FILTER(NONEMPTY( [Customer].[Customer Geography].
[Customer].MEMBERS
* [Date].[Date].[Date].MEMBERS
, [Measures].[Internet Sales Amount])
AS MYSET,
MYSET.CURRENTORDINAL = 1 or
NOT(MYSET.CURRENT.ITEM(0) IS MYSET.ITEM(MYSET.CURRENTORDINAL2).ITEM(0)))
MEMBER [Measures].[CustomersW/FirstSales] AS
COUNT(NonEmpty([FirstSales], [Measures].[Internet Sales Amount])),
FORMAT_STRING = '#,#'
SELECT {[Measures].[Internet Sales Amount],[Measures].
[CustomersW/FirstSales]} ON 0,
[Product].[Product Categories].[Category] ON 1
FROM [Adventure Works]
WHERE ({[Date].[Calendar].[Calendar Year].&[2002], [Date].[Calendar].
[Calendar Year].&[2003]}, [Customer].[Customer Geography].
[City].&[Calgary]&[AB]);
Q: How do you write MDX query that returns measure ratio to
parent value?