Download from Wow! eBook Microsoft SQL Server 2012 Analysis Services: The BISM Tabular Model ® Marco Russo Alberto Ferrari Chris Webb ® Published with the authorization of Microsoft Corporation by: O’Reilly Media, Inc 1005 Gravenstein Highway North Sebastopol, California 95472 Copyright © 2012 by Marco Russo, Alberto Ferrari, Christopher Webb All rights reserved No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher ISBN: 978-0-7356-5818-9 123456789 M 765432 Printed and bound in the United States of America Microsoft Press books are available through booksellers and distributors worldwide If you need support related to this book, email Microsoft Press Book Support at mspinput@microsoft.com Please tell us what you think of this book at http://www.microsoft.com/learning/booksurvey Microsoft and the trademarks listed at http://www.microsoft.com/about/legal/en/us/IntellectualProperty/ Trademarks/EN-US.aspx are trademarks of the Microsoft group of companies All other marks are property of their respective owners The example companies, organizations, products, domain names, email addresses, logos, people, places, and events depicted herein are fictitious No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred This book expresses the author’s views and opinions The information contained in this book is provided without any express, statutory, or implied warranties Neither the authors, O’Reilly Media, Inc., Microsoft Corporation, nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book Acquisitions and Developmental Editor: Russell Jones Production Editor: Holly Bauer Editorial Production: nSight, Inc Technical Reviewers: Darren Gosbell and John Mueller Copyeditor: Kerin Forsyth / Ann Weaver Indexer: Nancy Guenther Cover Design: Twist Creative • Seattle Cover Composition: Karen Montgomery Illustrator: nSight, Inc To the many BI communities that have supported me in the last years —Marco Russo I dedicate this book to Caterina, Lorenzo, and Arianna: my family —Alberto Ferrari I dedicate this book to my wife, Helen, and my two daughters, Natasha and Mimi Thank you for your love, understanding, and patience —Chris Webb Contents at a Glance Foreword xix Introduction xxi Chapter Introducing the Tabular Model Chapter Getting Started with the Tabular Model Chapter Loading Data Inside Tabular Chapter DAX Basics 121 Chapter Understanding Evaluation Context 147 Chapter Querying Tabular 185 Chapter DAX Advanced 237 Chapter Understanding Time Intelligence in DAX 291 Chapter Understanding xVelocity and DirectQuery 329 Chapter 10 Building Hierarchies 361 Chapter 11 Data Modeling in Tabular 381 Chapter 12 Using Advanced Tabular Relationships 407 Chapter 13 The Tabular Presentation Layer 429 Chapter 14 Tabular and PowerPivot 449 Chapter 15 Security 463 Chapter 16 Interfacing with Tabular 487 Chapter 17 Tabular Deployment 513 Chapter 18 Optimizations and Monitoring 559 Appendix A DAX Functions Reference 589 19 75 Index 601 Contents Foreword xix Introduction xxi Chapter Introducing the Tabular Model The Microsoft BI Ecosystem What Is Analysis Services and Why Should I Use It? A Short History of Analysis Services The Microsoft BI Stack Today Self-Service BI and Corporate BI Analysis Services 2012 Architecture: One Product, Two Models The Tabular Model The Multidimensional Model Why Have Two Models? The Future of Analysis Services 10 Choosing the Right Model for Your Project 11 Licensing 11 Upgrading from Previous Versions of Analysis Services 12 Ease of Use 12 Compatibility with PowerPivot 12 Query Performance Characteristics 13 Processing Performance Characteristics 13 Hardware Considerations 13 Real-Time BI 14 Client Tools 15 Feature Comparison 15 Summary 17 What you think of this book? We want to hear from you! Microsoft is interested in hearing your feedback so we can continually improve our books and learning resources for you To participate in a brief online survey, please visit: microsoft.com/learning/booksurvey vii Chapter Getting Started with the Tabular Model 19 Setting Up a Development Environment 19 Components of a Development Environment 19 Licensing 21 Installation Process 21 Working with SQL Server Data Tools 31 Creating a New Project 31 Configuring a New Project 33 Importing from PowerPivot 37 Importing a Deployed Project from Analysis Services 38 Contents of a Tabular Project 38 Building a Simple Tabular Model 40 Loading Data into Tables 41 Working in the Diagram View 49 Deployment 52 Querying a Tabular Model in Excel 53 Connecting to a Tabular Model 54 Querying a Tabular Model in Power View 65 Creating a Connection to a Tabular Model 65 Building a Basic Power View Report 66 Adding Charts and Slicers 68 Interacting with a Report 69 Working with SQL Server Management Studio 71 Summary 74 Chapter Loading Data Inside Tabular 75 Understanding Data Sources 75 Understanding Impersonation 77 Understanding Server-Side and Client-Side Credentials 78 Working with Big Tables 79 Loading from SQL Server 80 Loading from a List of Tables 83 Loading Relationships 86 viii Contents ... visualization and analysis tool, available through Microsoft SharePoint, which acts as a front end to Analysis Services http://www .microsoft. com/sqlserver/ en/us/future-editions /SQL- Server- 2012 - breakthrough-insight.aspx... Short History of Analysis Services SQL Server Analysis Services or OLAP Services, as it was originally called when it was released with SQL Server 7.0—was the first foray by Microsoft into the... success of Analysis Services and the rest of the Microsoft BI stack over the past decade has proved them correct SQL Server Analysis Services 2000 was the first version of Analysis Services to