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
Hands-On Business Intelligence with DAX

You're reading from   Hands-On Business Intelligence with DAX Discover the intricacies of this powerful query language to gain valuable insights from your data

Arrow left icon
Product type Paperback
Published in Jan 2020
Publisher Packt
ISBN-13 9781838824303
Length 402 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ian Horne Ian Horne
Author Profile Icon Ian Horne
Ian Horne
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Introduction to DAX for the BI Pro
2. What is DAX? FREE CHAPTER 3. Using DAX Variables and Formatting 4. Building Data Models 5. Working with DAX in Power BI, Excel, and SSAS 6. Getting It into Context 7. Section 2: Understanding DAX Functions and Syntax
8. Progressive DAX Syntax and Functions 9. Table Functions 10. Date, Time, and Time Intelligence Functions 11. Filter Functions 12. Statistical Functions 13. Working with DAX Patterns 14. Section 3: Taking DAX to the Next Level
15. Optimizing Your Data Model 16. Optimizing Your DAX Queries 17. Other Books You May Enjoy

Breaking down DAX syntax

So far, we've looked at quite a few examples of DAX expressions, but we haven't looked in detail at the structure of a typical DAX expression.

Let's set that straight by breaking down a typical DAX expression. For this one, we will define a measure that will give us the total sum of values in the Sales Quantity column of the Sales table, for products in the Deluxe class:

1 Deluxe Sales Quantity
2 =
3 CALCULATE
4 (
5 [Sum of Sales Quantity Measure]
6 ,
7 'Product'[Class]
8 = "Deluxe"
9 )

This DAX expression can be broken down as follows:

  1. We start with the name we want to give to the measure, which in this case is Deluxe Sales Quantity.
  2. The equals sign operator (=) defines the start of the DAX formula. When writing DAX expressions with Excel Power Pivot and SSAS Tabular, the equals sign will have a colon before it (:=).
  3. Our measure...
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