Search code examples
mdxcubesql-server-data-tools

SSDT define dimension-specific Aggregate Function for one measure


In my cube, I have a measure which needs to have specific aggregate function along each dimension.
for example measure="balance" should have last value function for dimension="Date" and that measure should have sum aggregate function for dimension="Branch". Does Microsoft SSDT 2013 Supports this functionality?


Solution

  • Date & Time Dimensions are special dimensions in SSAS. So SSAS enables us to have special functionalities via defining these dimensions. To use these functionalities, we should first define our corresponding dimension as a Time dimension and then set measure's aggregation function to whatever we want which is LastNonEmpty/LastChild in this question. Therefore SSAS do "summation" along all dimensions except time dimension and do aggregation function-specified along Time dimension. hope this can help somebody :)