Tabular Modeling (SQL Server Analysis Services)
The tabular modeling experience in SQL Server Analysis Services (SSAS) provides a modern, memory‑optimized analytics engine that enables rapid development of analytical solutions using familiar Excel‑like formulas (DAX) and industry‑standard connectors.
Key Concepts
- Tabular Model: A collection of tables, relationships, measures, and hierarchies stored in the VertiPaq engine.
- Data Sources: Relational databases, Azure services, and other supported connectors.
- DAX (Data Analysis Expressions): Formula language for creating calculations and measures.
- Partitions & Processing: Fine‑grained control over data refresh and storage.
Creating a Simple Tabular Model
Below is a step‑by‑step example of creating a basic sales model using SQL Server Data Tools (SSDT).
1. Define the Data Source
Provider=SQLNCLI11;Data Source=MyServer;Initial Catalog=AdventureWorksDW2019;Integrated Security=SSPI;
2. Import Tables
Select the tables you want to include. For this example we use DimProduct
, DimDate
, and FactInternetSales
.
3. Create Relationships
SSDT automatically detects relationships based on foreign keys. Verify them in the diagram view.
4. Add Measures with DAX
Total Sales = SUM(FactInternetSales[SalesAmount])
Sales YoY = CALCULATE([Total Sales],
SAMEPERIODLASTYEAR(DimDate[Date]))
Top 5 Products = TOPN(5,
VALUES(DimProduct[ProductName]),
[Total Sales])
5. Deploy the Model
Set the target SSAS server in the project properties and click Deploy. The model will be processed automatically.
Advanced Topics
Explore further capabilities such as row‑level security, calculation groups, and composite models.