Forum Discussion
Anonymous
5 years agoNot applicable
Check whether an ID has two specific values in another column
Hi, Hopefully someone can help me with the following. I have a column with ID's that can have multiple values for another column. I'd like to count/filter all ID's that have a specific value for ...
- Anonymous5 years ago
Couldn't quite make the above solutions work. It has something to do with the fact that ID's reoccur a lot. I had to pivot the table and then count for X and Y if they were > 0 for the ID's in the table. If I created a X AND Y > 0 I could get the cross section I need. Thanks all for the support!
Anonymous
5 years agoNot applicable
Hi Fowmy,
Thank you! Your solution gives me OR X OR Y rather than the ID's that have an occurance for both X AND Y. Any thoughts there?
Kindest regards,
Joost
Fowmy
5 years agoSuper User
Anonymous
Based on your sample data, my calculation will give you a result of 4 as it counts x and y.
If you need the distinct count then you can change the COUNT to DISTINCTCOUNT
can you share the expected result and how it should be calculated otherwise ?