3 Replies Latest reply: Jan 11, 2018 10:50 AM by Juraj Misina

# help to calculate a expression

Hi need some help

i want to calculate total no of hires :

suppose i select nov and 2017

i get the headcount for november and the attrition for november

total hires will be = headcount for (nov -1) - attrition for nov + x = headcount for nov

i want to find x please help me write it in a form of expression. will be a great help

• ###### Re: help to calculate a expression

Hello Sahil,

you can achieve this by using set analysis (A Primer on Set Analysis). See a very simple example:

```Sum(Headcount) //headcount for selected period

```

This example does not account for change of year (when you want to calculate your measure for January), so it needs to be expanded, but you should get the idea.

Best

Juraj

• ###### Re: help to calculate a expression

Hi Juraj thanks for the quick reply but still i am not able to get the desired result

i used this expression

but i am not getting the result pls help

• ###### Re: help to calculate a expression

Hi Sahil,

as I said, my example does not consider change in year, so hence the result. Try something like this:

```count({<