Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Active headcount overtime

Hi All,

Please help needed for active headcount for past 12 months.

Active employee overtime.PNG

Below is my expression:

=Count({<[HIRE DATE] = {"<=$(=AddMonths(MonthStart(Today()),-13))"}, [TERMINATION DATE]= {">=$(=AddMonths(Monthend(Today())))"} >}[EMP COUNT])+
(
Count({<[HIRE DATE] = {"<=$(=AddMonths(MonthStart(Today())))>=$(=AddMonths(Monthend(Today()),-12))"},[HIRE COUNT] = {'1'} >}[EMP COUNT])-
Count({<[TERMINATION DATE] = {"<=$(=AddMonths(MonthStart(Today())))>=$(=AddMonths(Monthend(Today()),-12))"},[TERMINATION COUNT] = {'1'} >}[EMP COUNT]))

Getting wrong headcount.

please see attached QVW

Thanks

neetha

11 Replies
sunny_talwar

What are you expecting to see? Do you know where the issue might be from your initial investigation?

Anonymous
Not applicable
Author

Hi Sunny,

Thanks for quick response.

I want overall headcount for every month, add hires and subtracting terminations.

The logic I tried is wrong I feel, it gives in thousands  ,where It should be over 1 lakh or more for each month.

Thanks

Neetha

sunny_talwar

Have you looked at each of the three expressions individually and tried to see if one of them is acting weird or if all of them seem incorrect? The problem is that from the looks of it, your expression looks right. I don't see any issue with them. So unless I have a sample to look at, I will only be able to guide you and not provide anything concrete.

sunny_talwar

One thing you can check is if your set analysis is in the same format as HIRE DATE? May be add this to a text box object -> =AddMonths(MonthStart(Today()),-13) and see if it is in the same format as HIRE DATE or not. If it isn't then add a Date() function with the matching format in all your set analysis

Anonymous
Not applicable
Author

Hi Sunny,

Please give your mailid.

Thanks Neetha

avinashelite

Hi Neetha,

As sunindia‌ suggested try to break our expression into 3 part and then check if everything i fine....then combine the expressions

<=$(=AddMonths(MonthStart(Today()),-13))"},[TERMINATION DATE]= {">=$(=AddMonths(Monthend(Today())))"} >}[EMP COUNT])+

// is this portion is rite it should be

> than 12 month and less than today !

>=$(=AddMonths(MonthStart(Today()),-13))"},[TERMINATION DATE]= {"<=$(=AddMonths(Monthend(Today())))"} >}[EMP COUNT])

Anonymous
Not applicable
Author

Hi Avinash,

Thanks for reply.

Requirement - Whole HC Based on MonthYear dimension for last 12 months.

for each data point it should give total active headcount for that month.

which I am not getting.

Thanks & Regards

Neetha

MarcoWedel

Hi,

please post example applications in your thread instead of mailing them to individual community members, so others can follow and learn.

Maybe this post helps:

Preparing examples for Upload - Reduction and Data Scrambling

thanks

regards

Marco

Anonymous
Not applicable
Author

HI Marco,

I have attached QVW .

Please look at it.

Thanks

Neetha