I have a report that is published monthly and I use the data from this report to generate a sub-report. The data set below is a compilation of 4 months of reports and has overall filter, which I apply when I pull the data together. This is also a truncated and slightly masked data set, but the logic will be consistent.
<tbody>
</tbody>
Period: Manually entered based on the month the report was pulled.
Month_Rank: Formula calculation =TRUNC(SUMPRODUCT(--([@[Period]] > [Period])/COUNTIF([Period],[Period]))+1,1)
Con#: Data from the monthly report
Unique: Formula calculation =IF(COUNTIF([Con#],[@[Con#]])=1,"Unique","Duplicate")
Assume 201812 is the most current period.
Objective 1: Count the "Con#"s that exists in the previous period AND does NOT exist in the current period.
Example: The count for the table above would be 1. CON5 exists in "Month_Rank" = 3, but not "Month_Rank" = 4. It does not matter if it exists in even earlier periods.
I am having trouble with the logic since it is counting the "Con#" column based on two sets of criteria from "Month_Rank". Any help or guidance would be greatly appreciated.
Please let me know if I need to clarify further.
Period | Month_Rank | Con# | Unique |
201809 | 1 | CON1 | Duplicate |
201809 | 1 | CON2 | Duplicate |
201809 | 1 | CON3 | Unique |
201810 | 2 | CON1 | Duplicate |
201810 | 2 | CON2 | Duplicate |
201810 | 2 | CON4 | Unique |
201811 | 3 | CON2 | Duplicate |
201811 | 3 | CON5 | Unique |
201812 | 4 | CON2 | Duplicate |
201812 | 4 | CON6 | Unique |
<tbody>
</tbody>
Period: Manually entered based on the month the report was pulled.
Month_Rank: Formula calculation =TRUNC(SUMPRODUCT(--([@[Period]] > [Period])/COUNTIF([Period],[Period]))+1,1)
Con#: Data from the monthly report
Unique: Formula calculation =IF(COUNTIF([Con#],[@[Con#]])=1,"Unique","Duplicate")
Assume 201812 is the most current period.
Objective 1: Count the "Con#"s that exists in the previous period AND does NOT exist in the current period.
Example: The count for the table above would be 1. CON5 exists in "Month_Rank" = 3, but not "Month_Rank" = 4. It does not matter if it exists in even earlier periods.
I am having trouble with the logic since it is counting the "Con#" column based on two sets of criteria from "Month_Rank". Any help or guidance would be greatly appreciated.
Please let me know if I need to clarify further.