CustomRollupColumn and aggregates
i've parent-child relation want cell value sum of children if cell value of parent given don't operate calculation.
so i've defined customrollupcolumn on parent forumla:
iif(isempty(([typehierarchy].[type].[3],[measures].[value])),([typehierarchy].[type].[1],[measures].[value])+([typehierarchy].[type].[2],[measures].[value]),([typehierarchy].[type].[3],[measures].[value]))
where [typehierarchy].[type].[3] parent of [1] , [2].
it works when want aggregate on dimension i've big issues.
just having following table: (id, type, date, value)
when browse cube i've right results except total on dates wher type 3 i've 490 hoped have 1997 (201+1306+87+430). unfortunatelly sass doesn't sum 2 first columns calculated customrollupformula.
any idea solve issue welcome...
so i've defined customrollupcolumn on parent forumla:
iif(isempty(([typehierarchy].[type].[3],[measures].[value])),([typehierarchy].[type].[1],[measures].[value])+([typehierarchy].[type].[2],[measures].[value]),([typehierarchy].[type].[3],[measures].[value]))
where [typehierarchy].[type].[3] parent of [1] , [2].
it works when want aggregate on dimension i've big issues.
just having following table: (id, type, date, value)
1 | 1 | 13/12/2006 0:00:00 | 101 |
2 | 2 | 12/12/2006 0:00:00 | 201 |
3 | 1 | 13/12/2006 0:00:00 | 102 |
4 | 1 | 13/12/2006 0:00:00 | 103 |
6 | 3 | 14/12/2006 0:00:00 | 87 |
7 | 1 | 14/12/2006 0:00:00 | 9 |
8 | 2 | 13/12/2006 0:00:00 | 1000 |
9 | 1 | 15/12/2006 0:00:00 | 401 |
10 | 2 | 15/12/2006 0:00:00 | 402 |
11 | 3 | 15/12/2006 0:00:00 | 403 |
when browse cube i've right results except total on dates wher type 3 i've 490 hoped have 1997 (201+1306+87+430). unfortunatelly sass doesn't sum 2 first columns calculated customrollupformula.
any idea solve issue welcome...
seddryck wrote: | |
|
using above logic expect example add 490 , can't follow values expect add 1997 coming from. maybe try re wording issue. want values children added value in parent if present?
SQL Server > SQL Server Analysis Services
Comments
Post a Comment