Hello,
I want to create a Watefall that displays the number of employees by reason of entry / leaving
, by year and by country according to the start date and end date.
here is my result.
the problem is that i can’t find the right figures.
I have a Data model that contains 3 types of tables. A fact table “t_contract”, assignment tables which contains the start date & end date “h_con …” and dimension tables “r_ …”
my relationships are:
t_contract (con_id) 1: * h_con_rfe (fk_con_id)
h_con_rfe (rfe_id) * : 1 r_ReasonForEntry (fkid_rfe)
Dates (Date) 1:* h_con_rfe (sdate)
t_contract (con_id) 1 : * h_con_rfl (fk_con_id)
h_con_rfl (rfe_id) :1 r_ReasonForLeaving (fkid_rfl)
Dates (Date) 1: h_con_rfl (edate)
t_contract (con_id) 1: * h_con_cou (fk_con_id)
h_con_cou (fk_con_id) * : 1 r_countries (fkid_cou)
Here is an example of the content of the tables
I created a table that groups the rfe / rfl which is not connected to any tabel.
I then created this list of Measures.
RFE Contract = COUNTROWS(t_contracts)
RFL Contract = CALCULATE(COUNTROWS(t_contracts);USERELATIONSHIP(‘Dates (1)’[Date];h_con_rfl[hcrl_eDate]))
HIRE = CALCULATE([RFE Contract];FILTER(r_reasonsForEntry;r_reasonsForEntry[rfe_id]=5))
RESIGN = CALCULATE(-[RFL Contract]; FILTER (r_reasonsForLeaving;r_reasonsForLeaving[rfl_id]=12))
Current Contracts Selection =
SWITCH( TRUE();
VALUES( ‘Reason_EL’[Reason_EL] ) = “ATL_END”; [ATL_END];
VALUES( ‘Reason_EL’[Reason_EL] ) = “DEATH”; [DEATH];
VALUES( ‘Reason_EL’[Reason_EL] ) = “EDF_MOB_L”; [EDF_MOB];
VALUES( ‘Reason_EL’[Reason_EL] ) = “END_TRIAL”; [END_TRIAL];
VALUES( ‘Reason_EL’[Reason_EL] ) = “FTC_END”; [FTC_END];
VALUES( ‘Reason_EL’[Reason_EL] ) = “MOB_L”; [MOB_L];
VALUES( ‘Reason_EL’[Reason_EL] ) = “MUT_AGREE”; [MUT_AGREE];
VALUES( ‘Reason_EL’[Reason_EL] ) = “OTH_L”; [OTH_L];
VALUES( ‘Reason_EL’[Reason_EL] ) = “REDUND”; [REDUND];
VALUES( ‘Reason_EL’[Reason_EL] ) = “RESIGN”; [RESIGN];
VALUES( ‘Reason_EL’[Reason_EL] ) = “RET”; [RET];
VALUES( ‘Reason_EL’[Reason_EL] ) = “RIF_PDV”; [RIF_PDV];
VALUES( ‘Reason_EL’[Reason_EL] ) = “ATL->NFT”; [ATL->NFT];
VALUES( ‘Reason_EL’[Reason_EL] ) = “EDF_MOB_E”; [EDF_MOB_E];
VALUES( ‘Reason_EL’[Reason_EL] ) = “FTC_RENEW”; [FTC_RENEW];
VALUES( ‘Reason_EL’[Reason_EL] ) = “FTC_NFT”; [FTC_NFT];
VALUES( ‘Reason_EL’[Reason_EL] ) = “HIRE”; [HIRE];
VALUES( ‘Reason_EL’[Reason_EL] ) = “MOB_E”; [MOB_E];
VALUES( ‘Reason_EL’[Reason_EL] ) = “OTH_E”; [OTH_E];
VALUES( ‘Reason_EL’[Reason_EL] ) = “SEC_IN”; [SEC_IN];
0)
To create the Waterfall I put Reason_EL in categories and Current Contracts Selection in Axis Y
I can’t find the right numbers and I don’t know where I got it wrong. Can anyone help me.
Thank you