Creating calculated measures
In this section, we will learn when to use the calculated measure feature and how to create a new measure by adding a function or expression. Let's look at some of the things we need to know before creating a calculated measure.
All measures need to contain a function. A measure cannot work without the table column you are creating the measure on having a function (sum
, min
, count
, and so on) within the formula—this is the difference between a calculated column and a calculated measure. This is called an aggregator (function), and without an aggregator, it is called a naked column in the programming world. IntelliSense is very useful here as it will complete your code for you.
The beauty of measures is that they are only calculated when they are accessed, and so they don't use up your memory. They also allow many different outputs to be produced by just changing the filter criteria of the existing measure. Measures are created in...