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…
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…
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…
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
#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…
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
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…
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
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 …
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…
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
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
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
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…
This article shows a basic technique used to sort months according to a fiscal calendar, by using a couple of calculated columns and the “sort by column
Optimizing conditions involving blank values in DAX - SQLBI
This article describes how blank values considered in a DAX conditional expression can affect its query plan and how to apply possible optimizations to impr
My last article described the Shadow Model data modelling technique and how you can use it to help resolve a specific performance challenge caused by tables forced to direct query mode in particula…
This post is the last in this series (for now) and describes a technique used to enhance performance in Power BI models that use Aggregate Awareness. I hope you’ve enjoyed the series as much …
I wasn’t originally planning on including an article on Incremental Aggs as part of this series, but I like the idea, and it seems like a good fit for the series, so here goes. The series so …
Crazy keyboard shortcuts for dax in power bi desktop
Patrick shows you how to be efficient in Power BI Desktop using keyboard shortcuts for the DAX Editor. It is crazy bananas! Documentation: https://docs.microsoft.com/power-bi/desktop-accessibility
Comparing DAX calculated columns with Power Query computed columns - SQLBI
This article provides information to help choose between DAX and Power Query when a table needs to compute additional columns. When building a data model in