Last time I talked about the custom summary , this time the content is similar to the last one is a custom summary, the way to achieve different! The UnaryOperatorColumn property is used.
This property describes:
The unary operator is used to summarize member customizations to the parent, the summary operation is a unary operation, and the unary operator needs to be specified as a column in the relational table as a custom rollup column, and the column must be set or mapped as a property of the parent-child hierarchy; Unary operators can also be applied to non-parent-child hierarchies. But rare. The following is a unary operator supported by SSAS:
1, Prepare: Create a new dimension table, inside the field, in addition to a operator with the last instance of the same, we will use this field to implement a custom summary: net income = Gross income-Total investment (7000=9000-200);
2, the fact table also extends the last table content:
3, build the dimension, first build the dimension as a parent-child hierarchy, because the UnaryOperatorColumn property can only be set or mapped to parent-child hierarchies; building a parent-child hierarchy is not much to say, (it is also emphasized that it is best to handle the relationship between fact tables and other dimensions when doing experiments) , otherwise there will be inexplicable strange phenomenon, the proposed example of the implementation of the table, and only the dimensions of the instance to establish a link, in order to exclude the impact! After you've built the parent-child hierarchy, to show the effect, you can set the MembersWithData property in the dimension attribute to: NonLeafDataHidden will not have the extra members in the last experiment. Then, after setting the NameColumn property or whatever, locate UnaryOperatorColumn in the P member's Properties dialog box, bind to column: operator, and then process dimension browse: the operator in the diagram can click the ' member Properties ' button and select Display.
4, through the third step, we have actually completed almost, the following will be introduced into the fact table, the relationship with the dimension, build a cube, the final effect, and then process the cube.
5, finally, browsing the multidimensional data to see the effect, but also achieved the effect of the last experiment: net income = Gross income-Total investment (7000=9000-200):
Enhanced-unaryoperatorcolumn Property for SSAS parent-child hierarchies