The last calculation to calculate the percentage won’t work because from what I can see each training is a different row. So you need to use table calculations to calculate that over the whole dataset. This calculation should give the right percentage:
(
maxOver(
{Robin Sort Eject},
[employee_name],
PRE_AGG
)
+
maxOver(
{Robin Zone 1},
[employee_name],
PRE_AGG
)
+
maxOver(
{Robin Zone 2},
[employee_name],
PRE_AGG
)
)
/
3
Regarding the second question, you could create a field along the following lines. Using sumOver
it calculates the number of times the supervisor has assigned any of those two courses in the last 6 months using sum and then return 1 if that count is greater than 0. (I am assuming some field names since I could not deduce them from your screenshots… but should be easy change to what you have)
ifelse(
sumOver(
ifelse(
{Training Assigned on} > addDateTime(-6, 'MM', now())
AND (training_title = 'ARU FAST Certification ' OR training_title = 'ARU UP Certification'),
1,0
),
[supervisor_name],
PRE_AGG
) > 0,
1, 0
)
(Also here I am partitioning using employee_name and supervisor_name… ideally you would partition by some unique id if you have such a field available because different people can have the same name)