Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Function in set analysis

Hi,

I'm trying to convert this expression to set analysis:

=count(distinct aggr(only(My_Field),My_Field))

Thanks in advance,

Yair

6 Replies
tresesco
MVP
MVP

Does that give different output than just

Count(Distinct My_field)

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))

elyM
Partner - Creator
Partner - Creator

Hi Yair,

could you provide more information?

what are waiting to obtain ?

Regards,

Ely

Not applicable
Author

Hi,

I'm trying to count in the expression number of different values for my field.

Lets say I have this values:

ID      Value

1          Val_1

1          Val_2

2          Val_2

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)

Thanks,

Yair

tresesco
MVP
MVP

Straight table:

Dim: ID

Exp: Count ( Value)

Not applicable
Author

Please see in my replay.

This kind of solution wont help me.

jonathandienst
Partner - Champion III
Partner - Champion III

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.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein