简体   繁体   中英

SSAS average aggregation

I'm currently trying to create an SSAS project which is used to analyse the profitability of each product.

One of the facts in my fact table is Profitability, which is a ratio calculated by (ListPrice - Cost) / Cost

However I'm having some problems with my Cube because SSAS automatically sum up my profitability ratios over time. I want to get the average instead of sum (eg profitabilty ratio of a product in 2005 should be the average monthly profitability ratio)

I've tried to change the aggregation function to AverageOfchildren but it didn't work (something wrong with my Time Dimension?)

Does anyone know what I should do in order to get the average aggregation ?

Thanks

In the case of ratio formulas, there are basically 2 way to do calculations. Imagine a formula a=b/c, then

"option 1" a=(b1+b2+..)/(c1+c2+..), or "option 2" a=a1/b1 + a2/b2 + ...

To determine which case have priority, you can use different methods to change calculation sequence.

If you have the formulas defined as customrollupmembers, then the easiest way is to assign solver orders to a, b, and c. As long as a have higher solve order then b and c, then it will use the correct sequence.

If you are using calculation script to create formulas, then sequence in the calc script can be used for this purpose as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM