distinctCountOver if condition

Hello everyone,

I’m trying to create a calculated field using the distinctCountOver function :

distinctCountOver({FIELD1},[{FIELD2}],PRE_FILTER) but I would like to do it with an if condition : where {FIELD3} = specific value.

Is it possible ? As the distinct_countIf function exists, I thought it was possible to mix the Over & If methods in the same time, but it’s not.

If someone can help, it will be great, thank you !



You can add an ifelse to the field you are counting.

distinctCountOver(ifelse({FIELD3}=‘Certain Value’,{FIELD1},NULL),[{FIELD2}],PRE_FILTER)

Thank you Max, it works !