Cheat Sheet: SSAS Basics

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

SQL Server Schema Types Statement

To calculate Simple
MDX Expression

[Measures].[Sales Amount] – [Measures].[Total


Statement
Changing a
Expression
SCOPE ([Measures].[Scope Profit]);
• Star schema: A schema where every dimension present in calculation using THIS = ([Measures].[Sales Amount] -

Analytical Service
Gross Profit Product Cost]
scope statement [Measures].[Standard Product Cost]);
the Data Source View (DSV) is directly linked or related to
To calculate sales in a END SCOPE;
fact or measurable table. It consists of a DE normalized ([Measures].[Sales Amount], Clear ration value
particular country e.g. SCOPE ([Customer].[Customer Geography].[All],
C H E AT S H E E T data and can be used in small companies with small (Canada)
[Customer].[Country].&[United States])
when at all levels Measures.RatioOverParent);
THIS = NULL
databases AGGREGATE(
To calculate year to SSAS KPI Value
SSAS Basics • Snowflake schema: It is a schema where some
date sales of any level
of date hierarchy
PeriodsToDate( [Date].[Calendar Hierarchy].[Year],
[Date].[Calendar Hierarchy].CurrentMember ),
Expression
[Measures].[Sales Amount] * 1.2
Case
([Measures].[Sales]))
dimensions are linked directly to a fact table and some When KpiValue( "Sales Revenue YTD" ) / KpiGoal(
AGGREGATE ( "Sales RevenueYTD" ) > 1
SSAS are indirectly linked to fact tables. It consists of a Alternate year to date
YTD ([Date Order].[Calendar].CurrentMember), Then 1
expression
normalized data and can be used in large companies with Measures.[Sales Amount]) When KpiValue( "Sales Revenue YTD" ) / KpiGoal(
SSAS is a technology from Microsoft Business Intelligence SSAS KPI Status "Sales Revenue YTD" ) <= 1
big databases
stack, which is used to develop online Analytical Processing Expression And
IIF (Product.Product.CurrentMember IS KpiValue( "Sales Revenue YTD" ) / KpiGoal( "Sales
(OLAP) solutions. • Star Flake: It is a hybrid structure which contains a Product.Product.[All],NULL, Revenue YTD" ) >= .85
To check the product IIF (Measures.[Sales Amount] = 0, NULL, Then 0
combination or star (DE normalized data) and snowflake
Cubes ranking RANK(Product.Product.CurrentMember, ORDER Else -1
(normalized data) schema (Product.Product.Members, Measures.[Sales End
Cubes are the multi-dimensional data sources which has two Amount])))) Case
basic constituents named dimensions and facts (measures). OLAP Cube (ParallelPeriod([Invoice Date].[Date
When IsEmpty
(ParallelPeriod
Hierarchy].[Date], 365, [Invoice Date].[Date ([Date Order].[Fiscal].[Fiscal Year],
• Dimensions: They are referred to as Master Tables OLAP cube is a technique which is used to hold the data in an Sales from 365 days ago
Hierarchy].CurrentMember), [Measures].[Sales 1,[Date Order].[Fiscal].CurrentMember))
optimized form and used to analyze the data with quick Amount]) Then 0
• Facts: These are referred to as measurable details response Sales done in the (Measures.[Sales Amount], [Date When VBA!Abs
previous period Order].[Calendar].CurrentMember.PrevMember) ((KpiValue( "Sales Revenue YTD" )- (KpiValue( "Sales
Revenue YTD" ),
Key Features of SSAS Multi-Dimensional TopCount
ParallelPeriod ( [Date Order].[Fiscal].[Fiscal Year],
To view top 10 selling 1, [Date Order].[Fiscal].CurrentMember)))
• Speed: It takes less time to respond to a query due to Expressions(MDX) products
(Product.Product.Product.Members,10,Measures.[Sa
/(KpiValue( "Sales Revenue YTD" ),
les Amount])
aggregation of the facts ParallelPeriod
It is a query language used for retrieving data from SSAS KPI Trend
Avg( ( [Date Order].[Fiscal].[Fiscal Year],
• Data Analysis: Allows multi-dimensional analysis multidimensional databases like OLAP databases
Expression
1,[Date Order].[Fiscal].CurrentMember))) <=.02
{ParallelPeriod( [Date].[Date].[Year], 3,
facilitated by the cubes To display the average Then 0
StrToMember("[Date].[Date].&[" + Format(now(),
MDX sales from three years When (KpiValue( "Sales Revenue YTD" )- (KpiValue(
• Automatic Link and display: It provide the facility to Query till date
"yyyyMMdd") + "]")) :
StrToMember("[Date].[Date].&[" + Format(now(), "Sales Revenue YTD" ),
automatically link and display the report QUERY ANALYSIS "yyyyMMdd") + "]")} , [Measures].[Sales Count]) ParallelPeriod
PARSER
• Good data model: For better business reporting and SERVICES ENGINE
'Get Sales Details for'
( [Date Order].[Fiscal].[Fiscal Year], 1,
Drillthrough Action [Date Order].[Fiscal].CurrentMember)))
analysis a good data model can be created caption
+[Product].[Product].CurrentMember.Member_Capt /(KpiValue( "Sales Revenue YTD" ),
QUERY FORMULA
ion ParallelPeriod( [Date Order].[Fiscal].[Fiscal
PROCESSOR ENGINE Year],1,[Date Order].[Fiscal].CurrentMember)) >.02
Multi-Dimensional ENGINE CACHE
To change SSAS
Calculation text color
IIF([Measures].[Profit Percentage] < .40, 255 , 0) Then 1
Database Else -1
Case End
STORAGE
STORAGE When IsEmpty
It is referred to as a cube which is a foundation of multi- ENGINE
ENGINE CACHE (ParallelPeriod
dimensional databases and each cube typically contains more ([Date Order].[Fiscal].[Fiscal Year],
than two dimensions 1,[Date Order].[Fiscal].CurrentMember))
SSAS KPI Goal
Then [Measures].[Sales Amount]
DIMENSION DATA Measure Group Data Expression
Else 1.10 *
Data Source Views Attribute Store Fact Data
([Measures].[Sales Amount],
ParallelPeriod([Date Order].[Fiscal].[Fiscal Year],
DSVs enable to create logical view of only the tables involved 1,[Date Order].[Fiscal].CurrentMember)) FURTHERMORE:
Hierarchy Store Aggregations
in the data warehouse design End
SSAS Certification Training Course

You might also like