Staff Cube with Movement Analysis
Posted: Tue Oct 23, 2012 5:17 am
Hi All,
I'm trying to build a Cube to store our Staff HC data and had this great idea of also including "dummy" accounts so that we could have a hierarchy like this:
Below are the current Rules / Feeders for the Cube:
(Note the New & Transfers In + Attrition & Transfers out have the same code at present)
I'm trying to build a Cube to store our Staff HC data and had this great idea of also including "dummy" accounts so that we could have a hierarchy like this:
- Beginning of Period (BOP)
- New Staff
- Attrition
- Transfers in
- Transfers out
- End of Period (EOP)
Below are the current Rules / Feeders for the Cube:
(Note the New & Transfers In + Attrition & Transfers out have the same code at present)
Code: Select all
# 221012 - JC Rules to Feed the Account Structure
Skipcheck ;
# New
['950191BA'] = N: If ( DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'9905500000-D909001',attrs('Period', !Period, 'Prior_Mth'),'Balance') = 0 &
DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'9905500000-D909001',!Period,'Balance') = 1,
If (DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'950191BA',attrs('Period', !Period, 'Prior_Mth'),'Balance') = 1,0,1),0) ;
# Attrition
['950192BA'] = if ( DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'9905500000-D909001',attrs('Period', !Period, 'Prior_Mth'),'Balance') = 1 &
DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'9905500000-D909001',attrs('Period', !Period, 'Next_Mth'),!MeasureType) = 0,
If (DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'950192BA',attrs('Period', !Period, 'Prior_Mth'),'Balance') = 1,0,1),0) ;
#Transfer In
['950193BA'] = if ( DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'9905500000-D909001',attrs('Period', !Period, 'Prior_Mth'),'Balance') = 0 &
DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'9905500000-D909001',!Period,!MeasureType) = 1,
If (DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'950193BA',attrs('Period', !Period, 'Prior_Mth'),'Balance') = 1,0,1),0) ;
# Transfer Out
['950194BA'] = if ( DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'9905500000-D909001',attrs('Period', !Period, 'Prior_Mth'),'Balance') = 1 &
DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'9905500000-D909001',attrs('Period', !Period, 'Next_Mth'),!MeasureType) = 0,
If (DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'950194BA',attrs('Period', !Period, 'Prior_Mth'),'Balance') = 1,0,1),0) ;
# EOP
['950195BA'] = N: if ( DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'940198PA',!Period,'Balance') = 1, 1, 0 ) ;
# BOP
#'950195BA'] = if ( DB('Biz_Staff',!Version,!Staff,!Product,!ResponsibilityCentre,'940198PA',!Period,'Balance') = 1, 1, 0 ) ;
Feeders;
['940198PA'] => ['950191BA'] ;