Skip to main content
Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

i have a requirement like,i want to find the no of employees count (Joining &Leaving)

Hi,

i have a requirement like,i want to find the no of employees count (Joining &Leaving)

Employee IDJoining DateLeaving Date
111112-Jan-201013-Feb-2011
111212-Jan-201013-Feb-2011
111312-Feb-201112-Feb-2012
111412-Feb-201112-Feb-2012
111514-Mar-201314-Apr-2014
111615-Apr-201316-Apr-2014

Thanks,

Rao

4 Replies
Vegar
MVP
MVP

rao qlikview

I don't think this is the best forum for this question. A better place to start is one of the forums/places that do not focus on the QDF. Eg: New to QlikView I believe the response time in these forums are a lot faster than in here.


Howerer, the question is posted and I'll try to help you. I think you should take a look into a feature called intervalmatch(), I think it will help you to fill this requirement. Take a look at Henric Cronström blogpost

http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/04/intervalmatch


Cheers

Vegar Arntsen, Lie

egbs consulting ab

http://bi-effekten.se

MK_QSL
MVP
MVP

Considering that you want to know the number of employees Joining and Leaving Month Wise... Use below in your script...

=================================

Employee:

Load

  [Employee ID],

  Date(Date#([Joining Date],'DD-MMM-YYYY')) as [Joining Date],

  Date(Date#([Leaving Date],'DD-MMM-YYYY')) as [Leaving Date]

Inline

[

  Employee ID, Joining Date, Leaving Date

  1111, 12-Jan-2010, 13-Feb-2011

  1112, 12-Jan-2010, 13-Feb-2011

  1113, 12-Feb-2011, 12-Feb-2012

  1114, 12-Feb-2011, 12-Feb-2012

  1115, 14-Mar-2013, 14-Apr-2014

  1116, 15-Apr-2013, 16-Apr-2014

];

Joining:

Mapping Load

  [Employee ID],

  [Joining Date]

Resident Employee;

Leaving:

Mapping Load

  [Employee ID],

  [Leaving Date]

Resident Employee;

DateBridge:

Load

  [Employee ID],

  ApplyMap('Joining',[Employee ID],Null()) as Date,

  'Joining' as DataType

Resident Employee;

Load

  [Employee ID],

  ApplyMap('Leaving',[Employee ID],Null()) as Date,

  'Leaving' as DataType

Resident Employee;

Join

Load

  [Employee ID],

  Date,

  Month(Date) as Month

Resident DateBridge;

================================

Now create a Straight Table

Dimension

Month

Expression

For Employee Joining...

COUNT({<DataType = {'Joining'}>}DISTINCT [Employee ID])

For Employee Leaving...

COUNT({<DataType = {'Leaving'}>}DISTINCT [Employee ID])

Not applicable
Author

Hi Manish,

Thanks for the information,The count is working.

Thanks & Regards,

Rao.

MK_QSL
MVP
MVP

Can you please close the thread by selecting appropriate answer?