Create a Model in Azure Analysis Services

This article guides you through the process of creating a new tabular model in Azure Analysis Services using Visual Studio with the Analysis Services projects extension.

Prerequisites

Steps to Create a Model

1. Create a New Project

  1. Open Visual Studio.
  2. Go to File > New > Project.
  3. In the Create a new project dialog, search for "Analysis Services".
  4. Select the Tabular Project template and click Next.
  5. In the Configure your new project dialog, enter a Project name (e.g., AdventureWorksTabular) and a Location.
  6. Click Create.

2. Connect to the Data Source

You'll now be prompted to specify the data source for your model. You can connect to various sources like SQL Server, Azure SQL Database, Oracle, etc.

  1. In the Table model designer dialog, select a Data source type (e.g., Microsoft SQL Server).
  2. Enter the Server name and Database name.
  3. Choose an appropriate Authentication method.
  4. Click OK.

Note: Ensure that your Analysis Services server has network connectivity to your data source. You might need to configure firewalls or virtual networks.

3. Select Tables and Columns

After connecting to the data source, you can select the tables and columns you want to include in your model.

  1. The Select Tables dialog will appear.
  2. Check the boxes next to the tables you want to import.
  3. You can also select specific columns from each table by clicking the table name and then selecting/deselecting columns.
  4. Click OK.

4. Design Your Model

Once the data is imported, you can start designing your tabular model in the Visual Studio designer.

  • Create Relationships: Define relationships between tables to establish connections for querying.
  • Create Measures: Define calculations and aggregations using DAX (Data Analysis Expressions).
  • Create Hierarchies: Organize data into hierarchies for drill-down analysis.
  • Format Data: Apply formatting to columns and measures as needed.

5. Deploy the Model

After designing your model, you can deploy it to your Azure Analysis Services server.

  1. In Solution Explorer, right-click the Tabular Project and select Properties.
  2. In the Properties window, under Deployment, set the Server Name to your Azure Analysis Services server instance (e.g., asazure://.windows.net/).
  3. Right-click the project again and select Deploy.

Tip: You can also connect to an existing model on your Azure Analysis Services server by choosing the "Connect to Existing Model" option when creating a new project.

Next Steps