I need 2 completely separate counts using the same data.
Count Number 1:
I need to count the occurrences of USP code *102F1 or 102F1 OR 102B OR 102B1 OR 102B3 that have the same CUST NUM and also have USP CODE *100 or 100 or 101 or 101A or 101E.
For example USP CODE *102F1 associated with CUST NUM 6 would not meet the criteria because although it does have USP CODE *102F1, it does not have any USP CODE *100 or 100 or 101 or 101A or 101E.
USP CODE 102F1 associated with CUST NUM 7 does meet the criteria as it contains USP CODE 102F1 and USP CODE 100. So it would count as 1.
USP CODE 102B and *102F1 associated with CUST NUM 11 does meet the criteria as it contains both USP CODES 102b and *102F1 as well as USP CODE 101. So they would count as 2.
Then as a completely separate count from those above I need Count Number 2:
I need to count the occurrences of USP code *102F1 or 102F1 OR 102B OR 102B1 OR 102B3 that have the same CUST NUM but DO NOT contain USP CODE *100 or 100 or 101 or 101A or 101E.
For example, those associated with Customer Numbers 6, 7 or 11 do not meet the criteria as they all contain USP CODEs *100 or 100 or 101 or 101A or 101E.
USP CODE 102F1 associated with CUST NUM 13 does meet the criteria as it does not contain any USP CODE *100 or 100 or 101 or 101A or 101E. It would count as 1.
Bookmarks