Count in one calculated field

Hi, I need help with the below example.

I am using CMSUSERID & RESOURCEID. based on that I need to count as described in the image.
Currently, It is giving me a total count of 1(min) which should be the total count(i.e. 1+1+5+11+2+3+1+2…).

Thanks in advance.

I believe you need to partition by resourceID.

distinctCountOver({RESOURCEID},[{RESOURCEID}],PRE_AGG)
1 Like

@Max your calculated field gives me a total count of 1520. I need the total no of distinct resources launched by district users. So, if you see in the below image and example.

User1 - 9e4 (1),
User2 - 538 (1),
User3 -

538 (1), 
b48 (1),
c22 (1),
c2e (1), 
f5c (5 times attempted, but as it is unique I need to count it as 1)

---- subtotal should be 5 ----
User4 -

ba8 (2 times attempted, but as it is unique I need to count it as 1)
c227 (2 times attempted, but as it is unique I need to count it as 1)

---- subtotal should be 2 ----

So, total count 1 +1 + 5 + 2…

is this visual and count achievable or not? :neutral_face: