PowerBI.tips

Fixing Measure Madness

October 4, 2016 By Mike Carlo
Fixing Measure Madness

Often times when you’re working with large data models you will have multiple tables with many relationships. It could be complex - maybe you’ve seen something like the following:

Large Data Model Photo Credit: www.biinsight.com

The Problem

Once all the tables have been loaded the manic measure building begins to support all the different visuals. A couple of sums here, a number of calculates over there, and boom, a beautiful report. You stand back and survey the work and realize you’ve built measures all over the place, in different tables, maybe even stuck a couple of measures in the wrong place. Whoops.

Tons of Measures

Maybe we should think about cleaning things up a bit, if only there was a way to group the measures. How do I group my measures? I’m glad you asked. With a little trickery we can make a measure table. Let’s begin.

Loading Sample Data

First we will load a little data. For this tutorial we will simply copy and paste in some data.

Note: For the full tutorial on manually entering in data visit this page.

On the Home ribbon click the Enter Data button. Copy in the table below into the Create Table window. Rename the table Sales Data and click Load to exit.

SalesmanItemUnit SalesRevenue
Salesman 3Item 44051357
Salesman 1Item 33391649
Salesman 1Item 33151332
Salesman 3Item 34181531
Salesman 1Item 34821633
Salesman 2Item 44481676
Salesman 1Item 43911432
Salesman 2Item 13411539
Salesman 3Item 14191482
Salesman 2Item 44141610
Salesman 1Item 43511670
Salesman 3Item 34491795

Manually Enter Data

Upon loading our data table we now have the following fields.

Fields of Data

Creating a Sample Measure

Now, let’s make a measure that calculates the revenue per unit. On the Home ribbon click the New Measure button and enter the following DAX measure.

Revenue Per Unit = SUM('Sales Data'[Revenue]) / SUM('Sales Data'[Unit Sales])

Next, make a table with the following fields: Salesman, Item, Unit Sales, Revenue, and Revenue Per Unit.

Salesman Table

Great! But, as we all know this is how the measure madness begins. From here we refine and finesse the data to craft the data story, and end up with tons of additional tables and measures.

Pro Tip: You can use the search window at the top of the Fields window to help you find buried measures or fields of data.

Using Search in Fields

Creating the Measure Table

Let’s make the measure table. Start by clicking Enter Data on the Home ribbon. Rename the new table to My Calcs, and rename Column1 to Calcs. You don’t have to rename Column1, but since I’m OCD about my data I like to rename the column to the same name as the table. Then click Load to exit the screen.

Measure Table Load

We now have a new table labeled My Calcs with one column labeled Calcs.

Moving Measures to the New Table

Next highlight the measure we created Revenue Per Unit. Then on the Modeling ribbon change the home table from Sales Data to My Calcs. This will move the measure.

Home Table for Measure

Right click on the Calcs column in the My Calcs table and then select Hide.

Hide Calcs Column

The Final Result

Next Save and then reopen the document (it’s a Microsoft thing I guess). After the document has reopened the My Calcs table has changed its icon from a table to a Measure icon.

Completed Measures Table

For kicks and giggles add the following measure to the My Calcs table.

Total Revenue = SUM('Sales Data'[Revenue])

Ok, one more.

Total Unit Sales = SUM('Sales Data'[Unit Sales])

Conclusion

There you go. A very straightforward approach to cleaning up all the random measures in your data model. I have found that when other team members are working with your data model this helps other people understand which fields have been calculated and which ones were imported via a query. This also helps you group logical calculations, further creating clarity within your data model.

If you want to read up more on making measure tables check out this great site. In addition to walking you through creating a measure table it also explains how to make a measure table when using direct query mode. As the article explains, while you are in direct query mode you are unable to manually enter data. Nice job, Soheil Bakhshi, well done.

If you liked this tutorial make sure you share. See you next week!

Previous

Intro to Guy In a Cube

More Posts

Feb 18, 2026

Hiring the Report Developer – Ep. 503

Mike and Tommy unpack what a report developer should know in 2026 — from paginated reports and the SSRS migration trend to the line between report building and data modeling.

Feb 13, 2026

Trusting In Microsoft Fabric – Ep. 502

Mike and Tommy dive deep into whether Microsoft Fabric has earned our trust after two years. Plus, the SaaS apocalypse is here, AI intensifies work, and Semantic Link goes GA.