Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pascos88
Creator II
Creator II

Count distinct in set analysis

Good morning,

I need a select distinct in the set analysis.

my formula is

count({<lgn_username ={"=count distinct (lgn_username)>2"}>} CompanyName) but the result is zero.

if I do

count({<lgn_username ={"=count (lgn_username)>2"}>} CompanyName) without the distinct, give me a number... looks that the distinct insiede doesn't work..

Any Idee or someone can see the error in the expression ?

Thanks for any helps

1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

maybe this:

sum( aggr( if( count(distinct lgn_username ) > 2, 1, 0 ), CompanyName ) )

Hope it helps.

View solution in original post

3 Replies
agigliotti
Partner - Champion
Partner - Champion

maybe this:

sum( aggr( if( count(distinct lgn_username ) > 2, 1, 0 ), CompanyName ) )

Hope it helps.

petter
Partner - Champion III
Partner - Champion III

the keyword DISTINCT has to be put inside the aggregation function like this:

Count( { < lgn_username = { "=Count( DISTINCT lgn_username)>2"}>} CompanyName )


pascos88
Creator II
Creator II
Author

for some reason  doesn't work.

The result is 0.. btw thanks for your answer