Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft Power BI Cookbook

You're reading from   Microsoft Power BI Cookbook Creating Business Intelligence Solutions of Analytical Data Models, Reports, and Dashboards

Arrow left icon
Product type Paperback
Published in Sep 2017
Publisher Packt
ISBN-13 9781788290142
Length 802 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Brett Powell Brett Powell
Author Profile Icon Brett Powell
Brett Powell
Author Test Author Test
Author Profile Icon Author Test
Author Test
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Configuring Power BI Development Tools 2. Accessing and Retrieving Data FREE CHAPTER 3. Building a Power BI Data Model 4. Authoring Power BI Reports 5. Creating Power BI Dashboards 6. Getting Serious with Date Intelligence 7. Parameterizing Power BI Solutions 8. Implementing Dynamic User-Based Visibility in Power BI 9. Applying Advanced Analytics and Custom Visuals 10. Developing Solutions for System Monitoring and Administration 11. Enhancing and Optimizing Existing Power BI Solutions 12. Deploying and Distributing Power BI Content 13. Integrating Power BI with Other Applications

Installing and Configuring DAX Studio

DAX (Data Analysis Expressions) is the "language of Power BI" as it's used to create the measures and queries visualized in Power BI reports and dashboards. Power BI generates and submits DAX queries to the source data model based on the structure of the visualization, user selections, and filters, just as other tools such as Excel generate MDX queries based on the selections and structure of pivot tables and slicers from workbooks. DAX expressions are also used to define security roles and can optionally be used to create columns and tables in data models based on other tables and columns in the model, which can be refreshed at processing time and used by measures and queries. Given that DAX serves the same function in SQL Server Analysis Services (SSAS) Tabular models and Power Pivot for Excel models, it's essential that BI professionals have a robust tool for developing and analyzing DAX code and the data models containing these expressions.

DAX Studio is a third-party tool used to query data models, edit and format code, browse the structure and metadata of data models, and analyze the performance and execution characteristics of DAX queries. For larger and more complex data models and expressions, as well as projects involving multiple models, DAX Studio becomes an essential supplement to the development and performance tuning processes.

How to do it...

Installation of DAX Studio

  1. Download the latest version from CodePlex (https://daxstudio.codeplex.com/).
CodePlex is in the process of shutting down and thus DAX Studio may be available on GitHub or another open source project repository in the future. The CodePlex archive may provide guidance to the new home for DAX Studio and the SQLBI.com blog's link to DAX Studio will likely be updated to the latest version as well.
  1. Save the .exe application file to your local PC.

  1. A notification is displayed as new versions are available.
Figure 27: Downloaded Setup Application from CodePlex
  1. Initiate the installation and setup Process.
  2. Accept the license agreement and choose a folder path to install the tool.
  3. Choose whether the DAX Studio add-in for Excel will also be installed.
    • The Add-In for Excel is required to connect to Power Pivot for Excel data models
    • Additionally, when DAX Studio is opened from Excel, query results can be exported directly to Excel tables
Figure 28: DAX Studio Setup
  • Upon full installation including the Add-in for Excel, a DAX Studio icon will appear on the Add-Ins Tab in the Excel Ribbon; the DAX Studio Add-in can be deactivated via the manage COM Add-ins dialog available from Excel--Options | Add-Ins tab.

Figure 29: DAX Studio Windows Application

Figure 30: The DAX Studio Add-in for Excel

The full installation with the Excel add-in is recommended as this enables direct output of DAX query results to Excel workbook tables and is required for connecting to Power Pivot data models.

Configuration of DAX Studio

  1. Open an Excel workbook.
  2. Open a Power BI Desktop file.
  3. From the Add-Ins tab of the toolbar, activate DAX Studio.
Figure 31: The DAX Studio Add-in for the Excel Connect Dialog
  1. Close the Excel workbook.
  2. Launch the DAX Studio standalone Windows application.
  3. Connect to a Power BI Desktop file or SSAS Tabular instance.

The Advanced Options settings of the Connect dialog establishes a connection in the context of the Sales Territory-North America security role defined in the model.

Figure 32: Advanced connect options
  1. Enable the DirectQuery Trace setting from the Options menu (File | Options).
  2. This provides visibility to the SQL queries passed from DirectQuery models.
Figure 33: DirectQuery trace enabled

How it works...

  • The standalone application provides the same functionality as the Excel add-in, excluding connectivity to Power Pivot for Excel data models and Excel output options
  • Powerful configuration options include the ability to specify a security role, effective user name identity, and Locale when defining connections to data models and when analyzing trace events associated with DirectQuery data models (that is, the SQL statements generated and passed to sources)
  • With DirectQuery Trace enabled, a connection to a DirectQuery model will expose the SQL statements passed to the source system in the Server Timings window

Figure 34: DAX Studio Trace of a DirectQuery Model

There's more...

Guy in a Cube video channel

An additional resource for learning and deploying Power BI is Adam Saxton's Guy in a Cube video channel (http://bit.ly/2o2lRqU). These videos, currently released every Tuesday and Thursday, feature concise, hands-on reviews and resolutions to common issues and scenarios. They also have high-level summaries of recent Power BI updates and releases. As a member of the MSBI content team, Adam can incorporate specific guidance from Microsoft product and technical teams, and regularly identifies recent blog posts from the wider Power BI community.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime