Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Zlatapa
Partner - Contributor
Partner - Contributor

Calculate previous year number of employees

Hi, I would like to calculate the number of employees for the same month in year-1 in order to being able to compare both.

Here's the expression I am using to get the calculation of the number of employees for a specific Data period. The dimension I am filtering it with is called [Data.Snapshot]:

Count(
{<
[Data.Year],
[Actions.Snapshot.autoCalendar.Month]
>}
distinct [PERNR-Pers.no.])

 

Could you please help to set the correct expression for year -1?

 

Thank you

Labels (2)
3 Replies
Bunim
Contributor III
Contributor III

Count(
{<
[Data.Year]={$(=year(today())-1)}
>}
distinct [PERNR-Pers.no.])

Zlatapa
Partner - Contributor
Partner - Contributor
Author

CONFIDENTIAL & RESTRICTED

Hi, many thanks for your reply, but it doesn’t seem to be calculating anything… Shows me a zero ☹
BrunPierre
Partner - Master
Partner - Master

@Bunim Try this by replacing time dimension fields with yours;

=COUNT({$<[Date Field] = {"$(='>=' & addyears(monthstart (max([Date Field])),-1)& '<=' & (AddYears(Max([Date Field]), -1)))"},[Year Field],[Quarter Field],[Month Field],[Week Field]>}DISTINCT [PERNR-Pers.no.])