Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I have the following measure which I use to obtain a measure of efficiency for an individual employee. I would like to make it work for all of the employees instead. This means that, for me, the employee should be compared to the average of all the other ones grouped together.
I tried using set expression, but I am afraid with the logic that I use here it's going to be counterproductive, as I added {< Employee = >} to all spots I could and it still doesn't work out well.
Alt(
(
Sum(
Aggr(
Count( {< ACTION_CODE = {'LABOR_OFF'}>} distinct MainSFC) * Tempo_Medio,
MainSFC
)
)
)
/
// Conteggio ore in minuti per giorno distinto e moltiplicato per numero dipendenti
(
(
Count(
distinct GiornoSettimanaLavorato
)
* 7.5 * 60 * GetSelectedCount(Employee)
)
// Sottrarre le ore di assenza disponibili
-
IF(
GetSelectedCount(Employee) > 0,
Sum(Absence * 60),
0
)
)
,0
)
Honestly your question is not clear
would you please share a sample qvf file or data
and explain the expected result via an exel file or image , or any other means
Hi @alespooletto ,
I'm not sure this is what you are looking for, but you could replace GetSelectedCount(Employee) with Count(distinct Employee)
Hello
The GetSelectedCount(Employee) returns zero if user didn't select any value under Employee
even if there are several possible values
This function returns the number of selected values and not number of actual values
so I assume in your expression you are trying to check if there is at least one employee then do a sum
thus as @F_B is saying you need to use Count(distinct Employee) instead of GetselectedCount(Employee)
Hello everyone. First of all, thanks for the replies, secondly I want to say I managed to solve this using different aggregations for the count in the nominator of the formula, and by changing - as many suggested - the function not to take the GetSelectedCount(Employee) but the Count.
Thank you