DAX as a Query Language

Similar documents
Evaluation Contexts in DAX (Level 200)

Time Intelligence Using DAX

Toolkit for DAX Optimization

Table of Contents: Microsoft Power Tools for Data Analysis #15 Comprehensive Introduction to Power Pivot & DAX. Notes from Video:

Performance Tuning for the BI Professional. Jonathan Stewart

Discovering the Power of Excel PowerPivot Data Analytic Expressions (DAX)

Shabnam Watson. SQL Server Analysis Services for DBAs

Shabnam Watson. Performance Monitoring Analysis Services Tabular

IDU0010 ERP,CRM ja DW süsteemid Loeng 5 DW concepts. Enn Õunapuu

MCSA BI Reporting. A Success Guide to Prepare- Analyzing and Visualizing Data with Microsoft Excel. edusum.com

Download The Definitive Guide To DAX: Business Intelligence With Microsoft Excel, SQL Server Analysis Services, And Power BI (Business Skills) PDF

AVANTUS TRAINING PTE LTD

DirectQuery vs Vertipaq Modes in SSAS Tabular Model

Developing SQL Data Models

Microsoft Power BI for O365

Building Data Models with Microsoft Excel PowerPivot

SQL Server Business Intelligence 20768: Developing SQL Server 2016 Data Models in SSAS. Upcoming Dates. Course Description.

Audience BI professionals BI developers

BASIC EXCEL SYLLABUS Section 1: Getting Started Section 2: Working with Worksheet Section 3: Administration Section 4: Data Handling & Manipulation

WELCOME TO TECH IMMERSION

Data Analysis Expressions (DAX)

SSAS Multidimensional vs. SSAS Tabular Which one do I choose?

Querying Data with Transact-SQL

Advance Excel Performing calculations on data 1. Naming groups of data 2. Creating formulas to calculate values

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright DAX

Querying Data with Transact-SQL

Ad Hoc Reporting with Report Builder

ADVANCED EXCEL Course Modules for Advance Excel Training Online (MS Excel 2013 Course):

2. In Video #6, we used Power Query to append multiple Text Files into a single Proper Data Set:

Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761)

Microsoft Power Tools for Data Analysis #10 Power BI M Code: Helper Table to Calculate MAT By Month & Product. Notes from Video:

DEVELOPING SQL DATA MODELS

Developing SQL Data Models

Updating your Business Intelligence Skills to Microsoft SQL Server 2012 Course 40009A; 3 Days, Instructor-led

Microsoft Querying Microsoft SQL Server 2014

Custom Report Writing Session 70, Jamie Caples, Synergy Resources

Querying Microsoft SQL Server 2014

10778A: Implementing Data Models and Reports with Microsoft SQL Server 2012

sqlbi.com 1 Who am I Latest conferences Agenda sqlbi.com

PowerPivot, an Introduction. By: Steve Lewis Principal Pyxis Analytics

Highline Excel 2016 Class 23: Introduction to Power BI Desktop to Create Data Model & Visualization

Writing Analytical Queries for Business Intelligence

COURSE 10977A: UPDATING YOUR SQL SERVER SKILLS TO MICROSOFT SQL SERVER 2014

Microsoft Querying Data with Transact-SQL - Performance Course

A Journey to Power BI

Microsoft EXAM Analyzing and Visualizing Data with Microsoft Excel. m/ Product: Demo File

Microsoft Implementing a SQL Data Warehouse

Bay Area BI User Group Mountain View 8 May, Mastering the Excel CUBE Functions

Deccansoft Software Services. SSIS Syllabus

The dangerous Beauty of Bookmark Lookups

Shawn Dorward, MVP. Getting Started with Power Query

AVANTUS TRAINING PTE LTD

20461D: Querying Microsoft SQL Server

Handling Advanced Data Warehouse Scenarios in SSIS

Shawn Dorward, MVP. Getting Started with Power Query

Course Outline. Writing Reports with Report Builder and SSRS Level 1 Course 55123: 2 days Instructor Led. About this course

Querying Microsoft SQL Server

SSAS Tabular in the Real World Lessons Learned. by Gerhard Brueckl

Implementing Data Models and Reports with Microsoft SQL Server 2012

Business Analytics Nanodegree Syllabus

Excel Using PowerPivot & Power View in Data Analysis

COURSE OUTLINE: Querying Microsoft SQL Server

Querying Data with Transact-SQL

Tasting the Flavors of Analysis Services 2012

Microsoft Analyzing and Visualizing Data with Microsoft Excel.

BEST. Content Library. The World s

The Microsoft Excel Course is divided into 4 levels

Implementing Data Models and Reports with SQL Server 2014

Writing Reports with Report Designer and SSRS 2014 Level 1

Querying Data with Transact-SQL (20761)

Sql Server Analysis Services Ssas Sllevuecollege

Implementing and Maintaining Microsoft SQL Server 2008 Integration Services

Querying Data with Transact SQL

Phillip Labry Sr. BI Engineer IT development for over 25 years Developer, DBA, BI Consultant Experience with Manufacturing, Telecom, Banking, Retail,

The World s Best Content Library!

Course Outline. Upgrading Your Skills to SQL Server 2016 Course 10986A: 3 days Instructor Led

Developing SQL Data Models(768)

Datazen. Bent On-premise mobile BI. November 28, #sqlsatparma #sqlsat462

Updating Your Skills to SQL Server 2016

SAP HANA Leading Marketplace for IT and Certification Courses

"Charting the Course... MOC B Updating Your SQL Server Skills to Microsoft SQL Server 2014 Course Summary

Implementing a SQL Data Warehouse

Excel 2016 Advanced. Course Objectives

Updating your Database Skills to Microsoft SQL Server 2012

Workbooks (File) and Worksheet Handling

20461: Querying Microsoft SQL Server

Schedules Can t Do That in Revit 2017

20767B: IMPLEMENTING A SQL DATA WAREHOUSE

TABLE OF CONTENTS PAGE

Problem Solving Complex Project Assistance DataWarehouse Assesments and Development Courses, Trainings and Workshops

TABLE OF CONTENTS PAGE

SAS BI Dashboard 3.1. User s Guide Second Edition

"Charting the Course to Your Success!" MOC D Querying Microsoft SQL Server Course Summary

TABLE OF CONTENTS. Getting Started Guide

Microsoft Power Tools for Data Analysis #13 Power Pivot Into #1: Relationships Rather Than VLOOKUP Notes from Video:

Column Store Internals

Updating your Business Intelligence Skills to Microsoft SQL Server 2012

Querying Microsoft SQL Server

Microsoft Access 2013/2016 Course Outlines (version differences will be noted in the outline).

1. What is Excel? Page 2 of 17

Transcription:

DAX as a Query Language Matt Allington exceleratorbi.com.au Online Feedback goo.gl/srvpmj

About me 25 year career at Coca-Cola working in both Sales and Information Technology Now running a Power Pivot consultancy in Sydney Australia Self Service BI Consulting Power Pivot/Power BI Training Blogger http://xbi.com.au/blog Author Microsoft MVP @ExceleratorBI https://au.linkedin.com/in/mattallington http://xbi.com.au 2

Who is in the Audience? Who is a SQL Professional or from IT? Who is an Excel/Power BI Professional/User? What is your DAX Skill? Zero, Intermediate, Middle to Pro?

Agenda Introduction to DAX as a Query Language Use cases for DAX Queries Demos More demos Please ask questions as we go along

Most Common Usage for DAX As Formulas Short for Data Analysis expressions Great for business/excel users (Functional Language, similar to Excel) Always returns a scalar value, e.g. A number Text Logical TRUE/FALSE Total Sales = SUMX(Sales,Sales[Qty] * Sales[Unit Price]) Total Sales of Bikes = CALCULATE([Total Sales], FILTER(ALL(Products[Category]), Products[Category] = Bikes ) )

DAX as a Query Language DAX Queries use the same DAX language Mostly functions are in common with standard DAX Some special query only commands (like EVALUATE). Some less common functions like SUMMARIZE ADDCOLUMNS The query sends a request for data to a database The result is always a table of data Queries return 0, 1 or more rows of data

Use Cases for DAX Queries Extracting underlying data into a table Detailed Summarised Learning to write better DAX measures Debugging formulas Building virtual tables for efficient iteration Checking performance of measures (using DAX Studio)

Demo: Intro to DAX Studio and DAX Queries

Key Points: Intro to DAX Studio and DAX Queries DAX Studio can connect to different Tabular sources. Every query must start with the EVALUATE statement. Can use any DAX function that returns a table. FILTER() VALUES() DISTINCT() ALL() CALCULATETABLE() etc

Summarising Data with Queries + Performance First let s look at the two Vertipaq engines

Storage Engine and Formula Engine Storage Engine (SE) Really Fast Compresses data on load Can retrieve records without decompressing in the right conditions Multi threaded Cached SE is the secret to small and fast workbooks Formula Engine (FE) Really Smart Has almost unlimited calculation capability Iterates in a row context and hence it can be slow Single threaded Not cached FE makes anything possible, but it can come at a cost

Demo: Summarising Tables

Key Points: Summarising Data SUMMARIZE function Is a Vertipaq Storage Engine function very efficient. When using more than 1 table, always start with the data table. Add extra columns from data or any connected lookup table. Can add summarised value columns, but it is inefficient at this task. ADDCOLUMNS Use in preference to using SUMMARIZE to add value columns. Works in a row context, so you must force context transition. SUMMARIZECOLUMNS Can use this instead of ADDCOLUMNS(SUMMARIZE()). No need to specify the starting table. Most efficient approach.

Demo: Testing Measure Efficiency Total Sales Value = SUMX(Sales,[Unit Price] * [Total Sales Qty])

Key Points: Testing Measure Efficiency Must use the ROW function to convert a measure to a table. Can use DEFINE function to override (or create) measures local to the query. Clear the cache between tests.

Demo: Debugging filters inside CALCULATE()

Summary: Debugging filters inside CALCULATE() DAX queries let you see the returned table portion of a measure/calculated column. Can also use New Table in Power BI. Sort the table out first, then get back to the measure.

Demo: Extracting data to Excel

Key Point: Extracting Data to Excel You must launch DAX Studio from within Excel to be able to export directly back to Excel.

Same Stores Growth vs LY

Growth in Same Sales vs LY

Same Sales Growth vs LY

Demo Same Stores Growth vs LY

Key Points: Growth in Same Sales vs LY Can use DAX Queries to create efficient summary tables Tables will retain lineage to the data model Then iterate efficiently over the summary table

Wrap Up and Questions Questions? Power Query Training http://xbi.com.au/pqt Online Feedback goo.gl/srvpmj DAX Training http://xbi.com.au/scpbi More Information on DAX Queries https://exceleratorbi.com.au/introduction-daxquery-language/