Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Getting Started with DAX Formulas

in Power BI, Power Pivot, and SSAS


UNDERSTANDING WHAT MAKES DAX SO UNIQUE

Eugene Meidinger
DATABASE DEVELOPER

@sqlgene www.sqlgene.com
Why you should learn DAX
Overview How to get set up
Adding Business logic
Filtering data
Analysing history
What is DAX?
DAX
DAX is an expression language for distilling your data
into bite-sized insights.
Where is DAX Used?

Power BI
Power Pivot
SSAS tabular mode
Azure Analysis Services
If you are doing BI
with Microsoft,
you need to learn DAX.
Where Does DAX Shine?
What Is DAX Good At?

Aggregations Filtering
DAX is optimized for turning DAX is optimized to slice and dice
millions of values into one result, your data, based on filters
such as total annual sales
Real Life Example

Your Boss You


Wants year over year analysis Need to find an easy way to
and a set of key indicators, manipulate the data
all in a dashboard
What Do You Need?

Easy way of defining Ability to slice and Support for historical


key metrics dice analysis
The Power of DAX

Prev Year Total Sales :=

CALCULATE ( SUM ( [Amount] ), SAMEPERIODLASTYEAR ( 'Date'[Datekey] ) )


DAX is a concise language
for expressing your KPIs.
What Is DAX Not Good At?

Operational Many to Many


Wide Tables
Reporting Relationships
The Challenge of Learning DAX
Why do we need a course to learn DAX at all?
Learning DAX is hard.

It requires a different
way of thinking.
The Problem with Learning DAX
Nesting
Evaluation Evaluation
Contexts Contexts
Time
Intelligence
Filtering

Difficulty
Measures

Scalar
Functions

Calculated
Columns

Functionality
What Makes DAX Hard to Learn?

DAX works with Calculated columns


columns and tables,
It looks like Excel instead of rows or versus measures is
cells confusing

DAX involves
manipulating DAX is non-linear
filters
Summary DAX is optimized for compressing data
into numerical insights
It is used heavily in the Microsoft
BI stack
It can be hard to learn, at first

You might also like