3 Replies Latest reply on Aug 19, 2016 4:48 PM by Michael Le

    distinct count of an if statement

    Brian Smith

      Example:

                         EpisodeID                    Status          Phase

                         A12345                     Status: A           1

                         A12345                     Status: A           2

                         A12346                     Status: D           1

                         A12346                     Status: D           2

                         A12347                     Status: A           1

                         A12347                     Status: A           2

                         A12348                     Status: A           1

                         A12349                     Status: D           1

                         A12341                     Status: A            1

                         A12341                     Status: D            1

      What I am trying to do is Count 1 for episodeID when Status = "A" while at the same time ONLY COUNT each Distinct Episode ID Number where the status is A or D. So if an Episode ID is the same and is duplicated only b/c it had two phases both with status A then you will only count 1 real A and not 2 because of the difference in phases. Or as an option I guess I could use .5's etc. for the count of each duplicate due to phases b/c the end number would come out the same? anyone have any experience with this?