O'Reilly logo

Microsoft Tabular Modeling Cookbook by Paul te Braak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summing aggregates and row iteration

In the recipes so far, we have looked at creating measures based on a simple summation. With these types of calculations, we simply define a measure as the sum of the respective columns. The calculations can then be used by other calculations and the result would be the same as if the calculation had been done within the row and aggregated. For example, if we define a measure of [Sales] and a measure of [COGS] (cost of sales), we could define a new measure as [Profit]:=[Sales]-[COGS]. Alternatively, we could add a column to the Sales table as line_profit with a column formula (SALES-COGS) and sum that column to create the new calculation.

However, in some situations, creating measures based on other measures ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required