This metric assumes you have KnowBe4 configured in a progression style where users are not phished unless they receive training. In this metric, it's looking for users in a standard group containing the word "included" versus the users in a group containing both the words "phishing" and "campaign". From there, it measures participation by calculating the percentage between the groups.To visualize, users are manually in the "included" group. They take training and are automatically placed in the "phishing campaign" group for continual phish testing. If they don't take the first training, they never 'graduate' to being phished, meaning that they aren't participating.This metrics measures the difference between the groups to identify participation percentage AND it rounds the number properly to the nearest whole number.
percent_of(~.Groups[?to_lower_case(name) | contains(@, 'campaign') && contains(@, 'phishing')] | [0].member_count, ~.Groups[?to_lower_case(name) | contains(@, 'included') && contains(@, 'users')].member_count | [0]) | to_number(slice_string(to_string(@), '-2'))>=
50
&& ceil(@) || floor(@)