Archive - Blog Posts on DAX

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. 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 contexts […] 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. Simple […] 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
Killer Tips to Write Harder Measures - Level: Intermediate Background I was reading the questions at http://community.powerbi.com today and saw an interesting question.  In short the OP wanted to know if there was a way to identify (via a measure) if the row in a table had a colour =”Blue”, but also to check that there were no other rows with the […] Read More
DAX UNICHAR Function in Power BI - I first learnt about the new DAX UNICHAR function in Power BI by reading Chris Webb’s blog (which was also the inspiration for this article today).  One of the uses of the UNICHAR function is to be able to include non text characters inside visuals.  When you combine a logical set of these codes (icon sets) you […] Read More
Using Variables in DAX - Level: Intermediate The variable feature in DAX has been around for more than a year and I have simply never got around to writing an article about it – I am changing that today.  Let me start off with some version information and syntax and then I will show you are real life example where I […] Read More
How To Solve a Complex DAX Problem - Level: Advanced I was helping someone on Power Pivot Forum last week with a tricky calculated column question.  As an aside, you may know that I always advise beginners to keep away from calculated columns.  You mostly don’t need calculated columns because in most circumstances a measure is a better option to use (read more […] Read More
New Functions – GENERATESERIES, SELECTEDVALUE - Level: Beginners/Intermediate In the August 2017 update of Power BI Desktop Microsoft released the new What If feature (first demonstrated at MDIS in July).  This new What If capability uses two new DAX functions to complete a task that you have always been able to do manually.  You still can of course still do it […] Read More