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
)
)