LOD function basics

As you know, each Dimension in the View splits the number of Marks and defines the level of detail for the Measure. However, at some point, you will probably need to aggregate a Measure at a different level than the View. To do that, you can use one of the three LOD functions. The three LODs are Include, Exclude, and Fixed:

  • Include adds the specified Dimensions to the level of detail of an aggregated Measure. For example, the calculation { INCLUDE [Region]: SUM([Sales])} computes the sum of the sales by Region and all the other Dimensions in the View.
  • Exclude removes the specified Dimensions from the level of detail of an aggregated Measure. For example, the calculation { EXCLUDE [Region]: SUM([Sales])} computes the sum of the sales without the Region if it exists in the View.
  • Fixed can do both, as you have to specify all the Dimensions of the level of detail precisely. For example, the calculation { FIXED [Region]: SUM([Sales])} computes the sum of the sales with Region only, no matter the other Dimension in the View.
Include and Exclude calculations are always Measures and consequently are aggregated. The default aggregation for Measures using the Exclude function is ATTR(), because the aggregation is at a higher level than the View. Fixed can be both Dimension and Measure. 

Let's start with the Include and Exclude functions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.196.146