05.04 Calculations using Attributes

Fundamentals Recap on Attributes

In FastClose, dimensions contain members, and members are things that you can add together.

For example the Measures dimension holds quantities that you can add together such as  Amount, Budget, Quantity, Invoice Balance, Stock on Hand - ie: - all things that can to some degree be meaningfully added to themselves.

Similarly if you were looking at the Time dimension, January can be added to February can be added to March and meaningfully makes a total for the Quarter.

However, there are many items which though they could be used in a calculation, can’t be meaningfully added together.

For example: Unit Cost. The Unit Cost of different items can’t be summed meaningfully.

Yet of course there are useful calculations that could use these items as terms in expressions, for example

Total Cost = Quantity * Unit Cost  

where we create a new measure called total cost based on a quantity measure multiplied by a unit cost attribute.

Items like Unit Cost are often found as "attributes" of dimensions.

Attributes can be found at many places in the User Interface by expanding a dimension, for example like this:

f2a7db40-4802-4639-8c61-6962ab7b2c0c

For a refresher on attributes, revisit the opening “Fundamentals” session and check out the final “Advanced” topic.

Calculations on Attributes

So taking Unit Price as an example – in the Sales Order Detail template:

The search box found at the top of most dimension lists is a very useful way of finding an attribute if you don’t already know in which dimension to find it.

fa8748a1-5d8a-440f-bfe8-b04fe9debeeb

Syntax

The value of an attribute can be accessed by appending the term “.Value” to the end of a dimension attribute term:   [Dimension].[Attribute].Value

For example:

So if I wanted a calculation to describe the total price of a line in a sales order, I could write the calc as:

[Measures].[OrderQty] * [Part].[UnitPrice].Value

Remember: Because we want the result to be available in the [Measures] dimension, we place [Measures].[OrderQty] first as FastClose will then work out the dimension from that first term.

Creation in the User Interface

To create such a calc:

Exercises and Tutorial Survey

05 Advanced Calculations - Attribute Calculations - Exercises.pdf

Your feedback helps us do better, to fill in a short survey on this tutorial, click here.