Hi guys,
I am facing a scenario and need logic on how to build this in Data Services. Please help me on this :
There is a HR Master Data table in which I've following columns :
EMP_CODE
EMP_NAME
AREA
START_DATE
END_DATE
Example, records will look like this :
1003 Samuel California 01 Apr 2011 31 Mar 2013
1003 Samuel Arizona 01 Apr 2013 30 Nov 2015
1003 Samuel New York 01 Dec 2015 31 Dec 9999
1007 Nathan xyz 10 Aug 2013 10 Dec 2015
1009 Samarth Caracus 30 Jun 1989 31 Mar 2011
1009 Samarth Delhi 01 Apr 2011 25 Dec 2014
Each employee has it's historical records as well which will indicate change in location based on dates. END_DATE of 31 Dec 9999 indicates that employee is working till date and present in organization.
Now the requirement is to build a dashboard on this data in which KPIs will be showing the headcount of employees Month & Year wise. That means for example, how many employees were present in Dec 1997, Mar 2010, Feb 2016 etc. The data model should be robust enough, so that any month/year headcount information could be pulled out of it based on these two columns i.e. START_DATE & END_DATE. I mean we can add further columns if required to table but as of now we have these two date columns through which we need to build logic.
If we consider END_DATE column to find headcounts, then confusion is how to make system understand that EMP_CODE 1003 was present in all 12 months of year 2012, 2014, 2015 as well when queried from reporting level(Tableau). If we consume the existing data as is, then it will show 1003 was present in Mar 2013, Nov 2015, and Dec 9999. How to show it's presence in rest of months? Do we need to add the data for dates via some logic or how to handle this? Need to make data generic i.e. user can see any month/year headcount from the data I make available for him in table.
Please help on this urgently...Any help would be highly appreciated. Thank you for reading and paying attention.
Dirk Venken : Any inputs Please?