SQL Server Analysis Services: From Zero to Hero

SQL Server Analysis Services: From Zero to Hero | SQLYARD

SQL Server Analysis Services: From Zero to Hero


SQL Server 2019
SQL Server 2022
SQL Server 2025

Every organization running SQL Server eventually hits the same set of problems. Analysts hammer OLTP databases with heavy aggregation queries and slow everything down. Finance teams ask for year-over-year comparisons that take minutes to return. Different teams build their own Excel workbooks full of lookups that never reconcile because each one defines “Revenue” slightly differently. SQL Server Analysis Services (SSAS) exists to solve these problems at the platform level rather than query by query.

SSAS is Microsoft’s dedicated semantic modeling engine. It sits between the relational database and the BI tools — Power BI, Excel, SSRS — providing pre-calculated aggregations, a consistent definition of business metrics, and a secure, governed layer that shields raw tables from direct access. This article covers what SSAS is, which mode to choose, how storage works, how each role in a data team benefits, and how to get started. For the full deep-dive into architecture, compatibility levels, security, processing, and Always On, see the companion article SQL Server Analysis Services: The Complete DBA Guide.

1

Why SSAS Exists

Beginner

A relational database is optimized for transactions: inserting, updating, and retrieving individual rows quickly. It is not optimized for analytical queries that scan millions of rows, group by multiple dimensions, and return aggregated totals. When analysts run those queries directly against the OLTP database, they compete with application traffic, cause blocking, and often wait minutes for results.

SSAS solves this with a different approach: load the data into an analytical model, pre-compute the aggregations that matter most, compress the data for fast in-memory access, and expose the result through a business-friendly layer that defines metrics consistently. The result is that a query returning total sales by month across five years of data returns in under a second rather than timing out after three minutes.

Three specific problems SSAS addresses that SQL Server alone cannot:

ProblemHow SSAS Solves It
Analytical queries blocking OLTP traffic Data is loaded into SSAS separately. Analysts query the model, not the production database. No contention.
Inconsistent metric definitions across teams Measures like Revenue, Gross Margin, and Active Users are defined once in the model and reused by every Power BI report, Excel PivotTable, and SSRS report that connects to it.
Direct access to sensitive raw tables SSAS exposes only the data the model is designed to show. Row-level security filters data by user identity. Raw tables stay inaccessible to analysts.
2

Tabular vs Multidimensional: Which Mode to Choose

Beginner
The mode selected at installation cannot be changed. SSAS installs in one mode only — Tabular or Multidimensional. The mode is set during SQL Server setup and cannot be changed afterward without uninstalling and reinstalling. If both modes are needed on the same server, two separate SSAS instances must be installed.

Tabular Mode

Tabular mode uses the VertiPaq engine: a columnar, in-memory compression engine that stores data in RAM and processes queries against compressed column segments. The query language is DAX (Data Analysis Expressions), which is the same language used in Power BI and Excel Power Pivot. Tabular is the default mode for new installations and is Microsoft’s primary investment area for SSAS development.

Choose Tabular when:

  • The team uses Power BI or Excel with DAX
  • Fast in-memory queries are the priority
  • The model will eventually be deployed to Azure Analysis Services or Power BI Premium
  • Starting a new project with no legacy cube dependency
-- Simple measure in a tabular model
-- Defined once, reused by every connected Power BI report, Excel PivotTable, and SSRS report
Total Sales := SUM ( FactSales[SalesAmount] )

-- Year-to-date measure using DAX time intelligence
Sales YTD :=
TOTALYTD (
    [Total Sales],
    DimDate[FullDateAlternateKey]
)

Multidimensional Mode

Multidimensional mode uses the MOLAP engine and organizes data into cubes, dimensions, hierarchies, and measure groups. The primary query language is MDX (Multidimensional Expressions). Multidimensional mode has been available since SQL Server 2000 and supports capabilities the tabular engine does not, including write-back (users write values back to cells for budgeting and what-if analysis), complex scoped MDX calculations, and cell-level security.

Choose Multidimensional when:

  • The organization has existing cubes that are working well and would be costly to redesign
  • Write-back capability is required
  • Complex parent-child hierarchies or advanced MDX calculations are needed
  • The BI tool in use generates MDX queries and connects natively to SSAS cubes
-- MDX query: total sales by calendar year
SELECT
    [Measures].[Sales Amount]       ON COLUMNS,
    [Date].[Calendar].[Year].Members ON ROWS
FROM [Sales]
Multidimensional has no cloud deployment path. Multidimensional mode is only supported on-premises or on Azure Virtual Machines. Azure Analysis Services and Power BI Premium support Tabular models only. Organizations that need to move SSAS to the cloud must use Tabular mode — there is no automated conversion tool from Multidimensional to Tabular.
3

Storage Modes: MOLAP, ROLAP, HOLAP, DirectQuery

Intermediate
ModeApplies ToHow Data Is StoredBest For
MOLAP Multidimensional (default) Data processed and stored inside SSAS in pre-aggregated multidimensional format. Aggregations computed during processing, not at query time. Maximum query performance. Use when data is refreshed on a schedule (nightly, hourly) and users need sub-second response on pre-defined aggregation paths.
ROLAP Multidimensional No local SSAS storage. Every query goes directly to the relational data source at query time. Near-real-time data requirements where the model cannot have a processing lag. Query performance is limited by the relational source.
HOLAP Multidimensional Hybrid: aggregations stored in SSAS (MOLAP), detail-level data left in the relational source (ROLAP). Drill-through to detail queries the relational source directly. Organizations that want fast aggregated queries for executives but need drill-through access to raw transaction detail without loading all detail data into SSAS.
VertiPaq (in-memory) Tabular (default) All data loaded into RAM in compressed columnar format. Queries execute entirely in memory. Fastest query performance for tabular models. Requires sufficient RAM to hold the compressed model.
DirectQuery Tabular No local data stored in SSAS. DAX queries translated to SQL and sent to the relational source at query time. Real-time data requirements or models too large for available RAM. Query performance depends on the source database.
HOLAP example scenario. A retail organization processes monthly sales totals nightly into SSAS (MOLAP aggregations). Executives query monthly and quarterly totals — sub-second responses from SSAS. When an analyst drills through to see individual transaction records, the drill-through query goes directly to the SQL Server data warehouse (ROLAP for detail). This avoids loading billions of detail rows into SSAS while still delivering fast aggregated queries.
4

The DBA: Offload and Secure

Intermediate

DBA Scenario

Analytical reports cause blocking on the OLTP system. The application team complains that report queries are locking tables and slowing down transactions during business hours.

Moving analytics into SSAS eliminates the contention entirely. The SSAS model loads data from the OLTP system during off-peak hours (typically overnight via SQL Server Agent or a scheduled process), so daytime user queries hit the SSAS model rather than the OLTP tables. The OLTP system is no longer touched by analytical workloads during business hours.

Two additional DBA responsibilities in an SSAS environment:

Partitions for efficient processing: large tabular models use partitions to divide a table into independently refreshable segments, typically by year. Only the current year’s partition refreshes nightly. Historical partitions are processed once and left intact, dramatically reducing processing time and source database load.

Row-level security: tabular models enforce data access through DAX filter expressions applied to roles. A user in the Sales Rep role only sees rows where their SalesRepID matches their identity. This is enforced at the model level regardless of which tool the user connects with.

-- Row-level security DAX filter applied to the FactSales table within a role
-- Users in this role see only rows where SalesRepID matches their login identity
-- Applied in the role definition in Visual Studio or SSMS

[SalesRepID] = USERPRINCIPALNAME()

-- More robust version using a security mapping table
-- Maps user UPNs to allowed regions in a separate table
[Region] IN
    SELECTCOLUMNS (
        FILTER (
            SecurityMapping,
            SecurityMapping[UPN] = USERPRINCIPALNAME()
        ),
        "AllowedRegion", SecurityMapping[Region]
    )
5

The Developer: Centralize Business Logic

Intermediate

Developer Scenario

Each team defines “Revenue” differently. The Finance team’s Power BI report shows a different revenue number than the Sales team’s Excel workbook. Both claim to be correct. Reconciliation takes hours every month.

SSAS solves this by providing a single location where measures are defined once and consumed everywhere. When Revenue is defined as a DAX measure in the tabular model, every Power BI report, every Excel PivotTable, and every SSRS report that connects to that model uses exactly the same calculation. The source of truth is the model — not the individual report.

-- Revenue and derived measures defined once in the tabular model
-- Reused by every connected BI tool automatically

Revenue :=
    SUM ( FactSales[SalesAmount] )

Cost :=
    SUM ( FactSales[TotalCost] )

Gross Margin :=
    [Revenue] - [Cost]

Gross Margin % :=
    DIVIDE ( [Gross Margin], [Revenue], BLANK() )

Revenue YoY % :=
VAR CurrentYear =
    CALCULATE ( [Revenue], YEAR ( DimDate[FullDate] ) = YEAR ( TODAY() ) )
VAR PriorYear =
    CALCULATE ( [Revenue], YEAR ( DimDate[FullDate] ) = YEAR ( TODAY() ) - 1 )
RETURN
    DIVIDE ( CurrentYear - PriorYear, PriorYear, BLANK() )

For multidimensional models, the same principle applies through calculated members and KPIs defined in MDX. A KPI can define not just the value but also a goal, a status (green/amber/red), and a trend indicator that every connected tool respects.

6

The Data Warehouse Engineer: Pre-Aggregate at Scale

Intermediate

Data Warehouse Engineer Scenario

A fact table has two billion rows. ETL runs fine. But when analysts connect BI tools directly to the warehouse, complex queries time out or return in minutes rather than seconds. Adding indexes helps for known query patterns but cannot cover every ad-hoc query shape.

SSAS with MOLAP partitions and aggregation design handles this by pre-computing the most common aggregation combinations during processing, rather than computing them at query time. The data warehouse serves as the source of truth; SSAS serves as the pre-aggregated query layer on top of it.

The partitioning strategy for a two-billion-row fact table in a tabular model typically uses yearly partitions. Each year is an independently processable segment. The partition covering the current year refreshes nightly. Historical partitions are not reprocessed unless source data corrections are required. This means nightly processing touches only a fraction of the total data volume.

-- Example partition query for a tabular model (defined in Visual Studio)
-- Each partition is a SQL SELECT statement returning one year of data
-- Only the partition covering the current year refreshes nightly

-- Partition: Sales_2024
SELECT *
FROM dbo.FactSales
WHERE OrderDateKey >= 20240101
  AND OrderDateKey <= 20241231;

-- Partition: Sales_2025
SELECT *
FROM dbo.FactSales
WHERE OrderDateKey >= 20250101
  AND OrderDateKey <= 20251231;

-- Partition: Sales_2026 (refreshes nightly)
SELECT *
FROM dbo.FactSales
WHERE OrderDateKey >= 20260101;

For multidimensional models, aggregation design specifies which dimension attribute combinations should have pre-computed aggregates stored in MOLAP. A well-designed aggregation set can satisfy 80% or more of typical business queries from pre-computed values without touching the relational source.

7

Installing and Configuring SSAS

Beginner

SSAS is installed through the SQL Server installation wizard as a separate feature from the Database Engine. The steps below apply to SQL Server 2019, 2022, and 2025.

  1. Run SQL Server setup. On the Feature Selection page, check Analysis Services.
  2. On the Analysis Services Configuration page, select the server mode: Tabular for new projects, Multidimensional and Data Mining Server for legacy cube environments. The “Data Mining” label appears in the installer but Data Mining is discontinued in SQL Server 2022 and later — selecting this mode installs Multidimensional mode only on SQL Server 2022 and 2025.
  3. Add the Windows accounts or groups that will be SSAS server administrators. The installing user is added automatically.
  4. Complete setup. SSAS installs as the Windows service MSSQLServerOLAPService (default instance) or MSOLAP$InstanceName (named instance).
  5. Install the Integration Services Projects extension for Visual Studio 2022 — this is the replacement for the older standalone SQL Server Data Tools (SSDT) installer. It is available from the Visual Studio Marketplace and is required to create and edit SSAS projects.
  6. Start small: download the AdventureWorksDW sample database, create a tabular project in Visual Studio, import a fact table and a few dimensions, deploy to the local SSAS instance, and connect with Excel or Power BI Desktop to validate.
SSDT is no longer a standalone installer for SSAS projects. The SQL Server Data Tools standalone installer is not the correct tool for SSAS development in SQL Server 2022 and 2025. Use Visual Studio 2022 with the Analysis Services Projects extension installed from the Visual Studio Marketplace. The extension handles both tabular and multidimensional model development.
8

Advanced Features to Explore Next

Advanced
FeatureWhat It DoesAvailable In
Perspectives A named subset of the model’s tables, columns, and measures. Used to simplify the model surface for different user audiences — Finance sees only financial measures and dimensions; Sales sees only sales-related objects. Perspectives do not enforce security. Tabular and Multidimensional
Translations Multilingual metadata for global deployments. Object names (table names, column names, measure names) can be translated into multiple languages. The client tool receives the translation matching the user’s locale automatically. Tabular and Multidimensional
KPIs (Key Performance Indicators) Extends measures with a goal value, status thresholds (green/amber/red), and a trend indicator. Excel and Power BI render KPI status icons automatically when connected to SSAS. Useful for executive scorecard reports. Tabular and Multidimensional
Calculation Groups A collection of calculation items (Year-to-Date, Prior Year, Rolling 12 Months, Budget vs Actual) that modify how measures calculate across the model. Define time intelligence once and apply it to every measure automatically. Tabular (compatibility level 1500+)
Named Sets (Multidimensional) Reusable MDX expressions defining a set of dimension members: “Top 10 Customers by Revenue”, “East Region Products”, “Active SKUs”. Referenced in MDX queries and cube browser selections. Multidimensional only
Write-back Allows authorized users to write values into specific cells in a cube for budgeting, planning, and what-if analysis. Changes are written back to a relational write-back table, not to the original fact table. Multidimensional only
Actions Context-sensitive actions triggered from a cube browser or BI tool: drill-through to detail rows, URL actions linking to related reports, or rowset actions returning a data set. Useful for connecting cube-level aggregates to source-level detail in SSRS. Multidimensional only
LINEST / LINESTX (SQL Server 2025) New DAX functions for linear regression using the least-squares method. The first native regression functions in DAX. Useful for trend analysis and forecasting within the model without external tools. Tabular (compatibility level 1700, SQL Server 2025+)
Data Mining (DMX) is discontinued. Do not implement it. Data Mining was deprecated in SQL Server 2017 Analysis Services and discontinued in SQL Server 2022 Analysis Services. It is not available in SSAS 2022 or SSAS 2025. Organizations that need predictive analytics should use Azure Machine Learning, SQL Server Machine Learning Services with Python or R, or Microsoft Fabric’s data science capabilities instead.
9

Where SSAS Fits in Microsoft’s Current Roadmap

Beginner

Microsoft’s analytical investment is concentrated in Power BI Premium and Microsoft Fabric, both of which use the same tabular engine as SSAS. Azure Analysis Services (AAS) is the cloud-hosted managed version of SSAS Tabular. Microsoft has not announced an end-of-support date for on-premises SSAS as of June 2026 — it ships with SQL Server 2025 and is supported through the SQL Server lifecycle.

PlatformModel TypeWhere It RunsWhen to Choose It
SQL Server Analysis Services Tabular and Multidimensional On-premises or Azure VM Existing on-premises SQL Server estate; data sovereignty requirements; multidimensional cube investment
Azure Analysis Services Tabular only Azure managed service Cloud-hosted tabular models without managing infrastructure; Microsoft is steering new projects toward Fabric instead
Power BI Premium / Fabric Semantic Models Tabular only (compatibility level 1500+) Microsoft cloud New analytical projects; tightest Power BI integration; Microsoft’s primary investment area
Starting point recommendation. For new projects, start with Tabular mode and DAX. It aligns with Power BI, works with Azure Analysis Services, and is the direction Microsoft is investing in. For organizations maintaining existing multidimensional cubes that are working well, continue using them — but plan for eventual migration to tabular for any new development. For the full technical reference on compatibility levels, security, processing, and Always On HA for SSISDB, see the companion article SQL Server Analysis Services: The Complete DBA Guide.

The technical information in this article was verified against Microsoft documentation at the time of publication. SQL Server features, cloud service capabilities, licensing terms, and configuration requirements can change between versions and cumulative updates. Always validate implementation details against current Microsoft Learn documentation before deploying to production. References in this article link directly to the authoritative Microsoft sources.


Discover more from SQLYARD

Subscribe to get the latest posts sent to your email.

Leave a Comment

Discover more from SQLYARD

Subscribe now to keep reading and get access to the full archive.

Continue reading