Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
betty2
Contributor
Contributor

Aggr calculation

Hello,

Can you help me solve this problem? I have this table containing an ID and an X_ID

betty2_1-1674066059936.png

 I need to calculate the number of IDs that have more than two X_IDs, for example:

The ID=1040 have 4 X_ID (2000,2005,2007,50) and the ID=1700 have 3 X_ID(3000,3009,3090)

In this case we have two IDs that have more than two X_IDs

I think I need to use the AGGR function but I'm not sure how.

THanks in advance.

 

Labels (2)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

minor change to make it logically correct

=Count({<ID={"=Count(Distinct X_ID)>1"}>} DISTINCT ID)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

3 Replies
Luisanabria
Creator
Creator

Hi

 

I dont know if my idea is correct but l could try using IF

Maybe something like this:

IF(id=1040,Count(x_id),id=1700,count(x_id))    as  Countfield

 

Hope l could help

BrunPierre
Partner - Master
Partner - Master

Hi,

Possibly as below.

=Count({$<ID={"=Count(ID)>1"}>} DISTINCT ID)

vinieme12
Champion III
Champion III

minor change to make it logically correct

=Count({<ID={"=Count(Distinct X_ID)>1"}>} DISTINCT ID)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.