4 Replies Latest reply on Sep 9, 2016 6:55 AM by Sandeep Kotha

# Similar ID's Count

Hi All,

I have a question on Count.Below are the two fields that I have.

1.ID: ID can have repetition clients

2.Yes/No:

My question:

I want to know the distinct count of ID's who said both Yes and No.

Could someone help me on this?

Best Wishes,

Sandeep

• ###### 1. Re: Similar ID's Count

Hi, there's several ways you could do this.

In the attached workbook see the calculated fields "One way" and "Another way". They give the same result.

• ###### 2. Re: Similar ID's Count

Hi Chris,

I am getting error while opening the workbook. Could you please paste the code in the thread?

• ###### 3. Re: Similar ID's Count

This is one way.

if { FIXED [ID] : COUNTD([Yes/No]) } = 2 then "Both Yes and No" else "Same response" end

This is another way to get the same result, but this technique could be applied to a wider group of situations similar to this one.

if

{ FIXED [ID] : max(if [Yes/No] = "Yes" then 1 else 0 end) } = 1 and

{ FIXED [ID] : max(if [Yes/No] = "No" then 1 else 0 end) } = 1

then "Both Yes and No" else "Same response" end

They both assume data like this.

 ID Yes/No 1 Yes 2 Yes 3 Yes 4 Yes 5 Yes 6 No 7 Yes 8 Yes 9 Yes 10 No 1 Yes 2 Yes 3 No 4 No 5 Yes 6 Yes 7 Yes 8 No 9 No 10 No
1 of 1 people found this helpful
• ###### 4. Re: Similar ID's Count

Hi Chris,

It worked for me. Thank you very much for the reply:)

Best wishes,

Sandeep