Archive - Blog Posts on DAX

Simple Filters and Syntax Sugar in DAX - Level: Intermediate There is a concept in the DAX language called “Syntax Sugar”.  Simply put, the developers have created simplified versions of more complex formulas to make it easier for people to learn and use the DAX language.  Here are a couple of examples Total Sales Syntax Sugar = SUM(Sales[ExtendedAmount]) Total Sales Full Syntax = […] Read More
Conditional Formatting with a Text Field in Power BI - One of the things I like about my live, online training courses is that I get to hear great questions from the trenches from people learning DAX and Power BI.  Last week, John asked me how to apply conditional formatting with a Text field (not a numeric field).  I knew it could be done, but […] Read More
Calculation Groups are Coming to DAX - I woke up Saturday morning to a lot of chatter and blog articles about an announcement that Microsoft made at SQL Bits.  Microsoft is adding “Calculation Groups” to the DAX language. There are a number of blogs already that talk about the announcement, including Chris Webb and The Italians, but I wanted to give my […] Read More
calendar overrun in Power BI
Calendar Over Run While Comparing Last Year’s Data - Recently, I was helping someone on Power BI community forum on the issue of calendar over run while comparing values with last year’s data. I thought it would make a good article to share with others. The Problem I will illustrate the issue using the AdventureWorks database (I need to make some tweaks to do this).  […] Read More
When to Use SUM() vs SUMX() - Level: Beginners/Intermediate (Updated Oct 2018). This is a further (third) update/edit to an article I first wrote 3 years back and then updated a year back.  When I update my articles I simply change the original post with the latest data – that way only the current/latest version is available preventing people stumbling on old […] Read More
Using Variables to Write Measures - It’s pretty early in the morning here in Sydney Australia (just after 6 am actually).  I just finished a fun YouTube session with Avi Singh where I demonstrated my approach to using variables in DAX to help write more complex formulas.  Avi streamed the session live on YouTube, and it is also there available to […] Read More
My Presentations at the MS Summit and Portland UG - Evaluation contexts in Power BI DAX I was in Seattle, USA in the last week of July participating in the Microsoft Business Applications Summit (MBAS). I love attending conferences like this and it was a privilege to present on a few topics over 3 days.  One of the presentations I gave was on the topic “Evaluation […] Read More
User Specified Growth on an Investment using Power BI - Level: Intermediate I wrote an article earlier this year that showed how you can take a table of future growth rates (different growth rates each year) and then calculate the future value of an investment using DAX.  I had a follow up question from Steve asking if it is possible to allow the user to […] Read More
Number of Days between 2 Transactions Using DAX - Level: Intermediate I got my haircut today (pretty spiffy one too, even if I do say so myself).  While I was chatting I asked my hair dresser “on average, how often should I get my hair cut”?  She told me (for men) around 4-6 weeks.  Then I got thinking (as I do), I wonder if […] Read More
My Supercharge Excel and Supercharge Power BI Books Available on Amazon - After what seems like a lifetime of waiting for the paperback book economy to tick its required boxes, both of my new books Supercharge Excel and Supercharge Power BI are now available to ship to most countries in the world from Amazon.com. This is a good opportunity for me to clarify how these new books […] Read More
Time Intelligence Using DAX - Level: Intermediate Last week I presented a webinar with Chuck Sterling (from Microsoft) on the topic of Time Intelligence.  This was a YouTube broadcast event that anyone could join live, however it has also been recorded and can be watched at any time (see below). This article is a follow up from that webinar with […] Read More
Introduction to DirectQuery - Level: Intermediate to Advanced Matt here.  I recently met Parker Stevens online through LinkedIn – he too is a Power BI fan, just like me.  Parker has shared a few techniques with me that I found very interesting.  These topics have not been covered on my blog before and hence I thought it was a […] Read More
Filtering a Column via a Visual AND CALCULATE - Level: Intermediate. Sometimes, just when you think you are getting the hang of the DAX language, something happens that completely baffles you.  Such events can cause you to doubt your own learning and progress. But let me assure you – this happens to EVERYONE at sometime or another.  In this article I am going to […] Read More
Show Me All Invoices Containing this Product - Level: Advanced I was answering an interesting forum question last week, and as is often the case I thought it would make an interesting article to share with you all here.  I have modified the scenario a bit for this article and have built out some test measures to help explain some concepts. Problem Definition […] Read More
Compound Growth using DAX - There are some things that are very easy to do in Excel that don’t seem to have an immediately obvious and simple solution in DAX.  One such problem is when you want to apply compound growth on an investment.  Let me make up an example so it is clear what I am talking about.  The […] Read More
Items NOT Selected in a Slicer? - I recently attended a school reunion (class of 1981 for what it’s worth – wow, I’m old!).  We all had a great time catching up, looking at old photos, taking new photos etc – how things have changed!  Anyways that got me thinking that it would be great to do something cool with Power BI […] Read More
EARLIER vs EARLIEST in DAX - Level: Advanced The EARLIER() and EARLIEST() functions are 2 of the harder functions in DAX to get your head around. If you come from a programming background it will probably be easy for you.  However as I have repeatedly stated on my blog, one of the many great things about Power BI is that it […] Read More
Sales of Same Products to Other Customers - Level: Intermediate I was helping someone on a forum recently and I thought the question and solution would make an interesting blog article. I have adapted the scenario to work with Adventure Works customer purchases, but this concept would work equally well across other entities, such as sales territories, calendar years etc. Problem Definition The […] Read More
Virtual Filters Using TREATAS - Level: Intermediate I have been aware of the TREATAS function for a very long time.  I have tried to understand how it works a few times but could never really work it out. I think part of the problem is the function name TREATAS is not very descriptive.  To contrast this point, the FILTER function […] Read More
Line Chart Conditional Formatting - I’m really pleased and excited to introduce you to Daniil Maslyuk (Twitter: @DMaslyuk).  I first met Daniil about a year ago (originally via email) as he was preparing to move to Australia.  Daniil made the plunge shortly there after and migrated to Australia (from Russia) – he now works as a Power BI consultant for Agile BI here in […] Read More