bbqpringles
New Member
- Joined
- Sep 23, 2015
- Messages
- 25
I'm trying to use COUNTIFS to get this done, but maybe there is a better way?
I'm trying to count the number of dates in my table (WK1_ATT) that have an eligible code. Here's the kicker - I only want to count each date once.
The formula below shows all of the eligible codes, but it will count the date more than once if there is more than one eligible code used on that date.
SUM(COUNTIFS(WK1_ATT[[#All],[EMP NO]],[@[EMP NO]],WK1_ATT[[#All],[CODES]],{"ADL","AL","BL","BLC","CP","CSL","CTL","FMC","FMCL","FMEC","FMLA","FMPL","HOT","IOD","MLT","PD","PPL","W"}))
(NOTE: my formula says "CODES" for the "CODE" header because the forum window is marking it off as code and I had to change the name)
For example, I only want to count 31-Jan-2022 once, but it's getting counted twice because both CP and W are eligible codes.
Because of this my COUNTIFS is returning "6.00" when I need it to count "5.00" (RDO and CPOT are not eligible, but CP and W are):
[/CODE]
I'm trying to count the number of dates in my table (WK1_ATT) that have an eligible code. Here's the kicker - I only want to count each date once.
The formula below shows all of the eligible codes, but it will count the date more than once if there is more than one eligible code used on that date.
Excel Formula:
Excel Formula:
(NOTE: my formula says "CODES" for the "CODE" header because the forum window is marking it off as code and I had to change the name)
For example, I only want to count 31-Jan-2022 once, but it's getting counted twice because both CP and W are eligible codes.
Because of this my COUNTIFS is returning "6.00" when I need it to count "5.00" (RDO and CPOT are not eligible, but CP and W are):