Same Period Last Year to Date DAX Calculation in Power BI
I have previously written about how to calculate the same period last year calculation and compare this year's values with the last year's values. However, sometimes, you don't yet have the full year, especially for the current year. You might want to compare this year's value with the last year's value up until the same…
Comparing with previous selected time period in DAX - SQLBI
This article describes how you can create a comparison with the previous time period in a visualization, regardless of whether the time periods are consecut
Understanding eager vs. strict evaluation in DAX - SQLBI
This article describes the differences between eager evaluation and strict evaluation in DAX, empowering you to choose the best evaluation type for your dat
Updating tabular models for Ordinal property in calculation groups - SQLBI
If you created a Tabular model using one of the preview versions of Tabular Editor, you don’t have the final structure for the Ordinal attribute that Micr
Calculate Totals in Power BI: Using Iterators in DAX – RADACAD
The total value that you see in a table is not actually SUM of all values in that column, it is, in fact, the calculation, when there is no filter. This, however, might not be the calculation that we want sometimes. we might want this value to be the sum of values of that column…
Earlier this week, a client came to me with a DAX error that I’d not seen before… Query (12, 4) Calculation error in measure : The True/False expression does not specify …
From SQL to DAX: Implementing NULLIF and COALESCE in DAX - SQLBI
This article describes how to implement a syntax equivalent to the T-SQL function NULLIF and the ANSI SQL function COALESCE, in DAX. As do many languages, D
Introduction For this blog, I want to share an interesting approach that can potentially speed up slow reports that include a distinct count calculation. The approach described in this article expl…
What has happened in the DAX world in 2019 - SQLBI
Another year has gone by and it has now been 10 years since DAX was first introduced in late 2009. As usual, it is time to review the past year and to take
#PowerBI – Copy a measure in the desktop – Why it doesn’t always work – mystery solved
Well – creating measures in the Power BI desktop is usually doing a lot of copying and pasting of measures. And unfortunately, we haven’t yet gotten a Copy measure in the shortcut menu when w…
Computing the future value of an investment based on compound growth in DAX - SQLBI
This article describes how to write efficient DAX expressions that compute the compound interest of incremental investments made throughout the holding peri
I have written another blog post about variables previously and explained how useful variables are. Variables in DAX are helpful in both readability and also the performance of your code. However, there are scenarios that you have to be careful when you use variables. Because variables are stored, they might return a result that is…
Write conditional statement using switch in dax and power bi
Conditional expressions are one of the most commonly used expressions in any language as well as DAX. However, in DAX, if you have multiple IF THEN expressions, there is an easier way of doing it; using a function called SWITCH, this blog is about how you can use switch function in DAX and Power BI…
Restrict number of data points in Power BI visuals
Sometimes we have data for many years in our dataset, but we want to restrict how many data points we want to show in #powerbi visuals at any given point. In this blog post, I talk about how you ca…
Optimizing LASTNONBLANK and LASTNONBLANKVALUE calculations - SQLBI
This article explains the behavior of LASTNONBLANK, LASTNONBLANKVALUE, and similar DAX functions, also providing patterns for performance optimization. The
A small change in DAX Formatter and in DAX formatting rules - SQLBI
DAX Formatter was created in 2013 to help users format their code based on the Rules for DAX Code Formatting published in October 2012. Because the main goa
The DAX shortcut guide to boost your productivity - DevScope's Blog
We asked our team for their favorite shortcuts when writing DAX in Power BI Desktop, and listed them in this DAX shortcut guide to boost your productivity.