Does that give different output than just
I don't see a scope of using set analysis there in your expression. And if you meant how to incorporate set analysis, may be you can use it like:
=count(distinct <Your Set> aggr(only(<Your Set>My_Field),My_Field))
I'm trying to count in the expression number of different values for my field.
Lets say I have this values:
I want the expression to return 2 for ID - 1 and 1 for ID 2
Please don't tell me to put it as expression of count(distinct Value) and id as dimension.
my final expression should be something like:
sum(if (count(distinct aggr(only(My_Field1),My_Field1)) = count(distinct aggr(only(My_Field2),My_Field2)),1)
But how (else) do you expect one expression to return two values? I think your requirement is not at all clear. Please elaborate with sample data and detailed expected results.