Analysis Services Concepts

On This Page

Introduction to Analysis Services

Microsoft SQL Server Analysis Services (SSAS) is a component of SQL Server that provides online analytical processing (OLAP) and data mining functionality for business intelligence applications. It enables users to analyze large amounts of data from various sources in a structured and intuitive way, supporting complex queries and the creation of reports and dashboards.

Analysis Services allows organizations to build sophisticated analytical solutions by defining data models that represent business information. These models can be queried using business intelligence tools like Microsoft Power BI, Excel, or custom applications.

Key Concepts

Databases

An Analysis Services database is a container for all the objects that define your analytical solution, such as data sources, models, and security roles. It's the primary unit of management and deployment.

Models

Models are the core of an Analysis Services solution, defining how data is structured, related, and presented for analysis. Analysis Services supports two primary model types:

Tabular Models

Tabular models store data in an in-memory columnar database (VertiPaq engine) using a relational-like structure. They are designed for ease of use and high performance, often preferred for scenarios where real-time or near-real-time analysis is crucial. Tabular models use DAX (Data Analysis Expressions) for calculations and queries.

Multidimensional Models

Multidimensional models represent data in a traditional cube structure with dimensions and measures. They are optimized for complex, ad-hoc analysis across many dimensions. Multidimensional models use MDX (Multidimensional Expressions) for calculations and queries.

Objects

Analysis Services databases contain various objects that work together to form an analytical solution. Key objects include:

Data Sources

Data sources define connections to the underlying relational databases or other data providers where the raw business data resides. Analysis Services uses these connections to extract and process data into its analytical models.

Datasets

In tabular models, datasets represent tables that are imported from your data sources. These tables are then related to form the structure of the tabular model. In multidimensional models, datasets are often referred to as data sources and associate tables with dimensions and fact tables.

Measures

Measures are numeric values that are aggregated from the fact data in your models. They represent key performance indicators (KPIs) or metrics that users want to analyze, such as sales revenue, profit, or quantity sold. Measures are typically defined using DAX in tabular models or MDX in multidimensional models.

Example DAX Measure:

Total Sales = SUM(Sales[SalesAmount])

Dimensions

Dimensions provide the context for measures. They are descriptive attributes that allow users to slice and dice data. Common examples include Time, Geography, Product, and Customer. In multidimensional models, dimensions are explicit structures, while in tabular models, they are typically represented by tables related to fact tables.

Hierarchies

Hierarchies are ordered sets of attributes within a dimension, allowing users to navigate data at different levels of detail. For example, a Time dimension might have a hierarchy like Year -> Quarter -> Month -> Day. A Geography dimension might have Country -> State -> City.

Cubes

A cube is a multidimensional data structure that organizes business data for analysis. It consists of fact tables (containing measures) and dimension tables (providing context). While the term "cube" is central to multidimensional models, tabular models achieve similar analytical capabilities through a relational structure queried with DAX.

Perspectives

Perspectives are custom views of an Analysis Services model, showing only a subset of tables, columns, and hierarchies relevant to specific user groups or business scenarios. This simplifies the model for end-users.

Roles

Roles are used to manage security by defining permissions for users or groups to access specific data or objects within an Analysis Services database. This can include restricting access to certain rows (row-level security) or specific tables and columns.

Analysis Services Architecture

Analysis Services operates as a service within SQL Server, providing a data engine that processes, stores, and serves analytical data. It interacts with external data sources and serves data to client applications. Key components include the XMLA (XML for Analysis) endpoint for client communication, the data processing engine, and memory management for query performance.

Processing

Processing is the act of loading data from source systems into Analysis Services models and updating the data in those models. This can be done incrementally or fully, depending on the data change strategy. Scheduled processing ensures that analytical data is kept up-to-date.

Security

Security in Analysis Services is paramount. It is managed through roles and permissions, allowing administrators to control who can access which data and perform which actions. This includes authentication and authorization mechanisms.

Deployment

Analysis Services solutions are typically developed using tools like SQL Server Data Tools (SSDT) or Visual Studio with the Analysis Services projects extension. The developed models are then deployed to an Analysis Services server instance.