0% found this document useful (0 votes)
13 views11 pages

7 Dax Mistakes

Uploaded by

Barun Behera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views11 pages

7 Dax Mistakes

Uploaded by

Barun Behera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

7 DAX

Mistakes
Download this PDF right away.
There are a lot of video links that you don’t
want to miss!
01

Thinking DAX is like Excel

DAX

Some people mistakenly believe DAX Formulas


work just like Excel formulas because they look
similar. In reality, DAX operates very differently
based on filter context.

| youtube.com/@GoodlyChandeep
02

DAX Writing Conventions


DAX has specific conventions for referencing
columns and measures within formulas.

For columns, you should prefix them with the


table name (e.g. Sales [Amount]).
1 Total Sales =
2 SUM = (Sales [Amount])
3 //Table is Sales
4 //Column is Amount

However, for measures, you can directly


reference them (e.g. [Total Sales]).
1 Commision =
2 [Total Sales]*10%
3 //Measure is Total sales

| youtube.com/@GoodlyChandeep
03

Totals are NOT the Sum of Rows

421 Incorrect
Total

721
Incorrect
1050
Total

Totals in Power BI visuals don't necessarily sum


the displayed rows; each number operates in its
own filter context.

Sum Visible Values of a Table in Power BI


Goodly

| youtube.com/@GoodlyChandeep
04
Neglecting Measure Formatting
and Comments
If you don't organize your DAX measures neatly,
they can become messy and hard to read.
1 Total Sales =
2 SUMX(Sales,Sales[Units] *
3 RELATED(Products[Price])
4 )

Plus, if you don't add comments to explain what


each measure does, it can be tough to
understand their purpose.
1 Total Sales =
2 SUMX(
3 Sales,
4 Sales[Units] * RELATED(Products[Price])
5 )
6 //Write more comments.

| youtube.com/@GoodlyChandeep
05
Measures are NOT the rows of a
Table
Measures are not rows of a table; to access a
column of a table, you need to create a row
context using iterator functions like SUMX or
FILTER.

1 Measure =
2 FILTER(
3 Sales,
4 // Now you can access the rows of the sales table
5 IF( Sales[Price] > 20...

A Measure is NOT the Row of a Table


Goodly

| youtube.com/@GoodlyChandeep
06
Understanding scalar and table
functions

DAX functions fall into two categories - scalar


and table functions.

Scalar functions return single values (e.g. SUM,


AVERAGE), while table functions return tables
(e.g. FILTER, ALL).

You should understand argument type for


each function and write DAX accordingly, e.g.
d
SUMX( [A Measure], [Expression] ) is wrong
because the first argument needs a table, not a
measure.

| youtube.com/@GoodlyChandeep
07
Thinking the holding table
affects a measure’s output
The table, not containing a measure doesn't
impact its calculation. So moving a measure to
another table doesn't change its result.

Moving the Total Sales


measure to the Produts
table is not going to
change the result of the
measure

The calculations and relationships in the data


model determine the result, not the holding table.

| youtube.com/@GoodlyChandeep
Want a detailed explanation?
Headover to this video.

10:40

7 Common Mistakes in DAX || Goodly


Goodly

| youtube.com/@GoodlyChandeep
Jumpstart your learning

DAX & Data Modeling Course


A step by step guide to learn DAX and Data
Modeling to solve real time business problems in
Power BI.

Learn More
Hi, My name is
Chandeep
Come see me on YouTube
youtube.com/@GoodlyChandeep

You might also like