Database Reference
In-Depth Information
Figure 11-34. Configuring the new calculated measure
Important
The expression we have used in Figure 11-34 will not work as expected! We explain the reason
in just a bit.
We set four other commonly used properties in Figure 11-34 . The “Format string” property allows you to
define how the values will be displayed in client applications like Excel. By default it is blank, but as you can see
in Figure 11-34 , it can be adjusted using the dropdown box or typing in a pattern.
The Visible dropdown box determines whether the member will be displayed by client applications. Setting
it to True can be useful when the calculated member is to be treated as an intermediate value for additional
calculations; it is not designed to be used independently.
The “Non-empty behavior” setting allows you to define the value you would like to display if the calculation
returns an empty value. This setting determines what will be displayed. For example, multiplying a null Title Price
by 5 Sales Quantity returns a null value. Setting the nonempty behavior to SalesQuantity overrides the null and
displays the Sale Quantity value of 5.
our example begs the question: Why was there a null price for an item, yet the company sold five of them?
it also reminds us that the Sales table in Pubs should have had a Sales Price column to store the price a title sold for,
in a given sales event. Sadly, this is not the case, so we will have to work with what we have.
Note
 
Search WWH ::




Custom Search