Topic: DAX

        317 posts
article –

Side effects of the Sort By Column setting in DAX

The Sort By Column feature in Power BI causes side effects that are important to know when writing a DAX formula. This article explains these side effects and how to write correct DAX code to avoid getting incorrect results.  Read more

blog post –

The hidden secrets of TOTALYTD

DAX has many time intelligence functions that are often redundant, offering different shorter syntaxes for longer more generic functions. However, sometimes the shorter syntax could be dangerous, as I explain in this blog post where I suggest using CALCULATE and…  Read more

article –

Creating table functions in DAX using DETAILROWS

This article describes how to use the detail rows expression of a measure to obtain the equivalent of creating table functions in DAX. This allows the reusing of a table expression in multiple CALCULATE filters.  Read more

blog post –

Correct calculate of age in DAX from birthday

By answering to a student question I realized we often used a wrong calculation of customers age in DAX, and the simple solution is to borrow the same technique used in Excel, using INT and YEARFRAC rather than DATEDIFF or…  Read more

blog post –

How to write DISTINCTCOUNTX in DAX

I received a question about how to implement the equivalent of a DISTINCTCOUNTX function in DAX. Well, such a function doesn’t exist in DAX, but imagine you want to write something like: The corresponding measure working in DAX is: In…  Read more

From SQL to DAX –

From SQL to DAX: Joining Tables

In SQL there are different types of JOIN, available for different purposes. This article shows the equivalent syntaxes supported in DAX and it was updated in May 2018.  Read more