Best practice for creating a hierarchy of dollar bracket measures in SSAS
I have a measure for open balance for a particular account. My users want to be able to have a hierarchy that can bucket dollar balances into som开发者_如何学编程ething like 0-500,500-1000, etc.
Is the only way to do this by creating a dimension that defines that hierarchy. Are there any other methods for providing this functionality to users.
If you want it as an hierarchy your proposed way would be the best solution, yes. The dimension can be derived from the fact table with a simple SQL query such as
SELECT CASE WHEN balance >= 0 AND balance < 500 THEN 1
WHEN balance >= 500 AND balance < 1000 THEN 2 END AS balanceGroupID,
CASE WHEN balance WHEN balance >= 0 AND balance < 500 THEN "0 - 500"
WHEN balance >= 500 AND balance < 1000 THEN "500 - 1000" END AS balanceGroupName
HTH
精彩评论