Employees counter

Hello together,

I have built the following measure so that I can determine how many employees were present in a time period.

Based on this number, we can determine whether, for example, targets have been achieved and whether we need to improve our personnel planning in certain periods.

In some reports, this is calculated on a daily basis and for several months.
However, this quickly goes into the memory limit. Interception using a cache is of little use here.

I thought about whether I could build this as a calculated field. However, I still have little experience with this.
Do you have any tips for me on how I can make this more performant?

The measure follows:

NonZero(
Sum(Filter(
– access all employees in the current Logged by hierachy
DescendantsSet([Logged by].CurrentHierarchyMember,[Logged by].CurrentHierarchy.Levels(“User”)),
– count till yesterday only to include full completed days
DateCompare([Time].CurrentHierarchyMember.StartDate, “Yesterday”) <=0
),
– Checks whether a ticket was provided with a worklog by the employee on the day.
CASE WHEN
([Measures].[Issues with Hours spent]) >= 1
THEN
+1
END
)
)

Hi Luke,
I can imagine this going to timeout when used daily for several months.
each row (when calculation enabled) goes through all imported Logged by users and checks issues with hours for these days.
I’m not sure you can pre-calculate the count of logged by users during import as the same user can work on different issues in the same day and then issue-level calcualted fields won’t know if user is already counted for another issue or not.
Perhaps an alternative is using this calculation on weekly level or using it for shorter period of time
Martins / eazyBI

1 Like

Hi Martins,

Thanks for your input :slight_smile:
I will look into how I can solve this internally a little better.