OS count restricted by group contained in site relevance

The following relevance will return a list of Operating Systems and number of endpoints running that particular OS.

(it, " (" & multiplicity of it as string & “)”) of unique values of preceding texts of firsts " " of operating systems of subscribed computers of bes custom site whose (name of it is contained by “Lab”)

Sample Output
Win10 (6)
Win2008 (9)
Win2008R2 (97)
Win2012 (3)
Win2012R2 (54)
Win2016 (12)

I’m looking for a way of returning the same details but for a specific group (ie. “dev servers”) contained within the “Lab” site. So far i’ve been unsuccessful. Hoping someone can give me a hand.

thanks in advance

@LouC I would use set arithmetic here. The intersection of the two sets, subscribed computers of the site and members of the group, contains the list of computers you need. You would replace subscribed computers of bes custom site whose (name of it is contained by “Lab”) in your relevance with the elements of intersection of the two sets, where the sets are separated by a semi-colon bound by a pair of parentheses.

The following relevance should return the correct results regardless of whether the Computer Group is Automatic or Manual.

(it & " (" & multiplicity of it as string & ")") of unique values of preceding texts of firsts " " of operating systems of elements of intersection of ((member set of it) of bes computer group whose (name of it = "Lab"); (subscribed computer set of it) of all bes sites whose (custom site flag of it and name of it is "dev servers"))

Let me know if this works for you.

3 Likes

I’m getting the following error:

Singular expression refers to nonexistent object.

Maybe there’s a problem with the name of the site and/or group? When I run this relevance against my data (where I don’t have a group named “Lab” or a site named “dev servers”, I get the same error.

I’m very tired today… your solution works perfectly. Thanks for the explanation too. Set arithmetic will come in handy in the future. Thank you!

I totally understand. It’s hard to wrap one’s brain around relevance.

hoping you can help me one more time… this time i’d like to filter on 2 groups rather than 1. I used what you provided and modified it but i don’t get any results returned. I’m not sure where i’m going wrong. This is what i tried:

(it & " (" & multiplicity of it as string & “)”) of unique values of preceding texts of firsts " " of operating systems of elements of intersection of ((member set of it) of bes computer groups whose (name of it is contained by “GROUP1|GROUP2”); (subscribed computer set of it) of all bes sites whose (custom site flag of it and name of it is “SITE_NAME”))