Have "Total" of column be a countDistinct

I have a use case where one person can be within multiple groups. I have a calculated field that counts the number of times a person is present within 2 groups. I am trying to have the “total” be a count distinct, that would only count each person once, no matter if they are in 2 groups multiple times.

Current result looks something like this:

             Count of People

Total: 6
Group 1: 2
Group 2: 2
Group 3: 2

Desired result:

                Count of People

Total: 3
Group 1: 2
Group 2: 2
Group 3: 2

Is this possible?

Hi @guhifdgh
did you checked this out?

You can then sum the result.