Topic: DAX

       183 blog posts of 327 posts
blog post –

Using DAX with DateTime values

I was recently reading an interesting question by a user. Given a date/time value and a number of hours, add the number of hours to the date, but considering some constraints related to working hours: The working hours are 09:00-17:00…  Read more

blog post –

Calculation Groups in DAX – first impressions

Microsoft announced at SqlBits a very important feature for DAX: Calculation Groups. These are my first impression about the new feature and the impact it will have on Analysis Services and Power BI.  Read more

blog post –

Detect missing parameters in DAX queries

Yesterday I answered to a question related to parameters in DAX that could be useful to other readers who use DAX in Reporting Services (SSRS): how to manage missing parameters of a DAX query? I wrote an article in the…  Read more

blog post –

Naming variables in DAX

There is an existing limitation in the current version of DAX, regarding what names you provide to variables in a DAX expression: a variable name cannot be the name of a table in the data model. This is not a…  Read more

blog post –

What has happened in the DAX world in 2018

We are approaching the end of 2018, so it is a good time to review what happened in the DAX world this year, what we’ve been up to at SQLBI and what is going to happen in 2019. New DAX…  Read more

blog post –

Displaying a list of selected months

Today I woke up with an interesting question, about how to show a selection of months in a nice way, detecting contiguous selection. You can easily understand the desired solution from the following figure: I enjoyed writing a quick solution,…  Read more

blog post –

DAX Guide – the reference I had been wanting

If you have read the book Alberto and I wrote, “The Definitive Guide to DAX” then by looking at the title you might think that this post is about the book. Not this time. I am talking about the new…  Read more

blog post –

Dates differences between Excel and DAX

DAX supports dates starting in 1900 and while teaching DAX I always explain that DAX manages dates like Excel, which is the reason why these limitations exist. Actually, this is true – but answering to a comment today I realized…  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

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