In this blog post, I will give you a comprehensive overview on the Power BI calculation groups. I’ll share with you some of my tutorials around calculation groups and you’ll see how and when to use them.
Calculation groups are a collection of items, which are basically the same measures that you create in your report but are created in a slightly different way. Calculation groups are created in Tabular Editor, which you can download for free from the internet. You can see the Tabular Editor in your External Tools.
If you’re using the latest version of Power BI desktop, the Tabular Editor should pop-up automatically. But in case it doesn’t, then you can check out this video and learn how you can get this tool in your Power BI desktop.
This first tutorial that I’m sharing with you is an introduction to calculation groups. In this tutorial, I created three measures (Total Sales, Total Cost, and Total Margin) for demonstration purposes.
I wanted to analyze sales in different time periods, and so I had to calculate three measures. But If I wanted to see the same result for Total Cost, I need to create three additional measures. For Total Margin, I also have to create three measures. So that’s a total of six more measures that I need to create.
But with calculation groups, I didn’t have to do it that way. Watch the full video tutorial below and see how I achieved this.
In this next tutorial, you’ll learn how to use calculation groups to create custom groupings specifically when you are unable to add new tables and columns to your Power BI desktop for some reason.
This example came from one of our members on the Enterprise DNA forum. He wanted to see how many employees have been absent from work and wanted to create custom groupings based on the number of days of absence. He was connected to a different PBI model, so he cannot add tables and columns.
Here’s the full video tutorial.
Lastly, I want to show you how you can create two split percentages in a donut chart using calculation groups if you don’t want to unpivot data in Power Query.
This example also came from the Enterprise DNA forum. The member was trying to achieve a donut chart visualization where he could split plant costs and mining costs. There’s a substantial back end of data, so he was looking for an alternative solution to get a slicer on the page along with the donut chart, without unpivoting the data.
Check out the video below to see how this can be done so easily.
Key Take Away
Using calculation groups is a simple and easy technique that you can use to simplify things when creating your reports in Power BI. You can quickly create visualizations and slicers using calculation groups.
Calculation groups are quite helpful when you have certain restrictions in your report such as being unable to add tables and columns, or not wanting to unpivot data, as shown in the tutorials that I shared in this post.
I hope you’ve found this tutorial helpful and that you’re able to apply it within your own reports. Check out the links below for more related content.