Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you have not yet introduced yourself to the basic concepts of flex.bi then please start with an overview of flex.bi concepts and learn how to analyse and create reports. This tutorial will explain how to define new calculated members using MDX calculation formulas.

If you have never worked with MDX before, we suggest you watch this video: MDX basic concepts 

Dimensions and hierarchies

...

 and now when you combine the calculated members in reports [Customers].[West coast] with [Measures].[Store Sales] you will get the total sales for all these three states together. If you combine it with [Measures].[Profit] you will get the total profit for all these three states.

There is a default hidden [Measures].[Fact Count] measure which will return number of fact rows in a cube database table. You can use it to calculate simple average values, for example, define [Measures].[Average Store Sales] as

[Measures].[Store Sales] / [Measures].[Fact Count]

Moving across dimension levels

When you use [Measures].[Store Sales] it will calculate the value of the Store Sales measure for other corresponding dimension members for each row / column in report. If you would like to override some other dimension value in your calculation formula then you need to use tuples. Tuples are a combination of members from different dimensions. The MDX syntax for tuples is (member_1, member_2, ..., member_n). For example, if you would like to get the Store Sales measure value for all customers then you would use the tuple ([Measures].[Store Sales], [Customers].DefaultMember.

 Let's define a calculated measure [Measures].[Percent] with the formula (and percentage formatting) [Measures].[Store Sales] / ([Measures].[Store Sales], [Customers].[DefaultMember]).

 When you combine [Measures].[Percent] with e.g. [Customers].[USA].[CA] then you will see the percentage of California sales from total customer sales in the report.

...