Book Image

Hands-On SQL Server 2019 Analysis Services

By : Steve Hughes
Book Image

Hands-On SQL Server 2019 Analysis Services

By: Steve Hughes

Overview of this book

SQL Server Analysis Services (SSAS) continues to be a leading enterprise-scale toolset, enabling customers to deliver data and analytics across large datasets with great performance. This book will help you understand MS SQL Server 2019’s new features and improvements, especially when it comes to SSAS. First, you’ll cover a quick overview of SQL Server 2019, learn how to choose the right analytical model to use, and understand their key differences. You’ll then explore how to create a multi-dimensional model with SSAS and expand on that model with MDX. Next, you’ll create and deploy a tabular model using Microsoft Visual Studio and Management Studio. You'll learn when and how to use both tabular and multi-dimensional model types, how to deploy and configure your servers to support them, and design principles that are relevant to each model. The book comes packed with tips and tricks to build measures, optimize your design, and interact with models using Excel and Power BI. All this will help you visualize data to gain useful insights and make better decisions. Finally, you’ll discover practices and tools for securing and maintaining your models once they are deployed. By the end of this MS SQL Server book, you’ll be able to choose the right model and build and deploy it to support the analytical needs of your business.
Table of Contents (19 chapters)
1
Section 1: Choosing Your Model
4
Section 2: Building and Deploying a Multidimensional Model
8
Section 3: Building and Deploying Tabular Models
12
Section 4: Exposing Insights while Visualizing Data from Your Models
15
Section 5: Security, Administration, and Managing Your Models

Creating measures with the CALCULATE function

In the previous section, we created measures that gave us counts for each of the colors for our items. We will be using the CALCUATE function to create formulas that return the percentage of a color versus the total of colored items in the model. To do this, we will need to eliminate those items whose color is N/A. We will use the CALCULATE function to do this.

The CALCULATE function allows us to add filters to the calculation we are trying to work with. CALCULATE does not allow the use of a measure in its expression. It also returns a single value. The filters for this function need to return a table, so the work we did with our item filter in the count calculations will need to be handled as a table filter. The other important note here is that the CALCULATE function's filters override other filters that may be applied by external operations in visualization tools. The calculation will be performed over the tables as specified...