Semi additive problem...
I have an issue regarding semi additive behaviour which, as a relative newbie, has me stumped.
Take this scenario...
I have a very simple design which consists of a fact table with a single measure (balance), a time dimension and an account dimension. Defined as follows:-
DimAccount (SCD)
AccountKey
AccountType (defines the semi additive behaviour)
Status (can hold the value “Active” or “Inactive”)
StartDate
FactBalances
DateKey
AccountKey
CurrentBalance
The data held is as follows:-
My design is configured to use semi additive behaviour for my current balance (LastNonEmpty). So if I drag the “CurrentBalance” into my view window I am correctly told 5000.
Now my account dimension is slowly changing and here is where the problem starts. Amending the data above to show a change in account status to AC01 during the 3 month period gives me the following data:-
If I now drag in the current balance I still get 5000 (great) but if I drop the attribute “Status” as a row field I get:-
Not the behaviour I was seeking. I am after the following result:-
Can anyone help me to achieve this?
I have an issue regarding semi additive behaviour which, as a relative newbie, has me stumped.
Take this scenario...
I have a very simple design which consists of a fact table with a single measure (balance), a time dimension and an account dimension. Defined as follows:-
DimAccount (SCD)
AccountKey
AccountType (defines the semi additive behaviour)
Status (can hold the value “Active” or “Inactive”)
StartDate
FactBalances
DateKey
AccountKey
CurrentBalance
The data held is as follows:-
Code:
DimAccount (5 accounts)
AccountKey[tab][tab]AccountType[tab][tab]AccountNumber[tab][tab]Status[tab][tab]StartDate
1[tab][tab]Balance[tab][tab]AC01[tab][tab]Active[tab][tab]2009/01/01
2[tab][tab]Balance[tab][tab]AC02[tab][tab]Active[tab][tab]2009/01/01
3[tab][tab]Balance[tab][tab]AC03[tab][tab]Active[tab][tab]2009/01/01
4[tab][tab]Balance[tab][tab]AC04[tab][tab]Active[tab][tab]2009/01/01
5[tab][tab]Balance[tab][tab]AC05[tab][tab]Active[tab][tab]2009/01/01
FactBalance (3 months of data)
DateKey[tab][tab]AccountKey[tab][tab]CurrentBalance
20090101[tab][tab]1[tab][tab]1000
20090101[tab][tab]2[tab][tab]1000
20090101[tab][tab]3[tab][tab]1000
20090101[tab][tab]4[tab][tab]1000
20090101[tab][tab]5[tab][tab]1000
20090201[tab][tab]1[tab][tab]1000
20090201[tab][tab]2[tab][tab]1000
20090201[tab][tab]3[tab][tab]1000
20090201[tab][tab]4[tab][tab]1000
20090201[tab][tab]5[tab][tab]1000
20090301[tab][tab]1[tab][tab]1000
20090301[tab][tab]2[tab][tab]1000
20090301[tab][tab]3[tab][tab]1000
20090301[tab][tab]4[tab][tab]1000
20090301[tab][tab]5[tab][tab]1000
My design is configured to use semi additive behaviour for my current balance (LastNonEmpty). So if I drag the “CurrentBalance” into my view window I am correctly told 5000.
Now my account dimension is slowly changing and here is where the problem starts. Amending the data above to show a change in account status to AC01 during the 3 month period gives me the following data:-
Code:
DimAccount (5 accounts but with one historic change row)
AccountKey[tab][tab]AccountType[tab][tab]AccountNumber[tab][tab]Status[tab][tab]StartDate
1[tab][tab]Balance[tab][tab]AC01[tab][tab]Active[tab][tab]2009/01/01
2[tab][tab]Balance[tab][tab]AC02[tab][tab]Active[tab][tab]2009/01/01
3[tab][tab]Balance[tab][tab]AC03[tab][tab]Active[tab][tab]2009/01/01
4[tab][tab]Balance[tab][tab]AC04[tab][tab]Active[tab][tab]2009/01/01
5[tab][tab]Balance[tab][tab]AC05[tab][tab]Active[tab][tab]2009/01/01
6[tab][tab]Balance[tab][tab]AC01[tab][tab]Inactive[tab][tab]2009/02/01
FactBalance (3 months of data)
DateKey AccountKey[tab][tab]CurrentBalance
20090101[tab][tab]1[tab][tab]1000
20090101[tab][tab]2[tab][tab]1000
20090101[tab][tab]3[tab][tab]1000
20090101[tab][tab]4[tab][tab]1000
20090101[tab][tab]5[tab][tab]1000
20090201[tab][tab]6[tab][tab]1000
20090201[tab][tab]2[tab][tab]1000
20090201[tab][tab]3[tab][tab]1000
20090201[tab][tab]4[tab][tab]1000
20090201[tab][tab]5[tab][tab]1000
20090301[tab][tab]6[tab][tab]1000
20090301[tab][tab]2[tab][tab]1000
20090301[tab][tab]3[tab][tab]1000
20090301[tab][tab]4[tab][tab]1000
20090301[tab][tab]5[tab][tab]1000
Code:
Active[tab][tab]5000
Inactive[tab][tab]1000
Grand total[tab][tab]5000
Not the behaviour I was seeking. I am after the following result:-
Code:
Active[tab][tab]4000
Inactive[tab][tab]1000
Grand total[tab][tab]5000
Can anyone help me to achieve this?