Today, I want to do an overview of quick measures and show you how they have evolved over time. I’ll talk about its pros and cons and then finish with what I think is a better alternative. You can watch the full video of this tutorial at the bottom of this blog.
The reason for using quick measures was to speed up your development because sometimes, writing DAX can be cumbersome and takes a bit of a learning curve. So quick measures were used to create measures relatively quickly, although there are some major drawbacks.
Let’s just jump right into it. If we click on this dropdown of Select a calculation, we have all these types of analyses that can be done like Average per category or Weighted average per category. You can add Filters, which are basically just replicate what you can do when using the CALCULATE function and run Time Intelligence calculations.
Let’s say I want to do a running total calculation. My base value will be Total Sales and field value will be Date.
This is the result it came up with.
The reality is yes, it can speed up your development. But for me, there are a few things that I don’t love about it.
If you look at the formula that was used and you’re just starting out, it’s quite hard to understand. I don’t understand why I’m getting a weird running total. It’s hard to know what the functions ALLSELECTED and ISONORAFTER are doing in combination with CALCULATE.
Basically, the calculation is going to back to the beginning of time, to the first piece of data that we have in our data set, regardless of filters in place. But it’s hard to know that.
Let’s have a look at another example on average per category. All you have to do is bring in the dimensions in your fields and click OK.
Quick measures allow you to open up a range of new calculations and seamlessly put them into your measure groups.
Obviously, you’ll need to change the names of these measures because they’re really long.
You can see that we’re getting the average sale per product. The calculation is basically working out the average, but then again, I get worried when I see a function like KEEPFILTERS.
There’s also the CALCULATE function around the measure, which isn’t even necessary.
With quick measures, you can create things quickly, but there is potential for confusion when it comes to the result you are getting. There are simpler ways to get the exact same result without going through all of this stuff. We can use the VALUES function and remove CALCULATE.
With this formula, we will get exactly the same result, but without these additional functions that can bring confusion.
When quick measures first came out, everyone was asking if we still have to write DAX measures. The answer to that is a resounding yes, because you still have to understand how DAX works.
A Better Alternative To Quick Measures
Here at Enterprise DNA, we have created a better way to speed up your productivity when it comes to Power BI development with our Analyst Hub platform. You can create formulas in your own way and in your own formatting, and save them into our Analyst Hub application.
We also have our DAX Cleanup Tool.
I’ve got a lot of documents saved on this app, which I can easily find using the search bar. I can search for AVERAGEX and click on one of our patterns saved.
I have here an AVERAGEX pattern. I have the option to name things slightly differently, maybe something similar to what was in my quick measures. Since all of these are located within the Analyst Hub, I can just copy the code really quickly…
And then change the name to Average Sales per Product and change the other details very quickly.
Think about how you can scale this really quickly across all your formulas. In my case, I’ve cut down my DAX formula writing time by a significant amount. I already have a good understanding of all of these patterns, so all I do now is copy a pattern, change a few parameters, and then work out my analysis.
Harnessing The Value Of Community
We’re also harnessing the value of our community. Quick measures is stuck with the Power BI team, and they haven’t done much to it in recent months.
In our community, you can have a look at everyone’s formulas, and see what everyone else is uploading.
We’re also going to have an app for M code and raw codes. The functionality is going to be so much more than what you would get from using quick measures.
The whole idea behind the Analyst Hub is that a lot of the stuff in quick measures is already set up in the app, and you can reference it quickly. The results from quick measures are too complicated and unnecessary in my view, like this one:
Hopefully, you can understand why we went about building the Analyst Hub – we did it because we saw there was a real gap there. There’s plenty to leverage off around how you do your own development.
Lastly, don’t forget to subscribe to the Enterprise DNA TV channel, where there’s a lot of content coming out all the time from myself and a range of content creators, all dedicated to improving the way that you use Power BI and the Power Platform.