I am trying to build out a waterfall that will count how many customers we have based on what time they became a customer. The plan is to count the account IDs if they are new business and remove them if they have been cancelled. The issue is an account can have numerous opportunities marked as new business. As seen in the example of data provided on the left, account "1" has several new business opportunities but it should only be counted as 1 account. The table on the right is what I am trying to get to based on the data provided. Time is the x axis and the quarter the customer was new is the y axis. The values in the table are just hardcodes as I'm struggling with the equations. Any help would be much appreciated
[TABLE="width: 934"]
<colgroup><col><col><col><col><col span="6"></colgroup><tbody>[TR]
[TD]Account ID (15)[/TD]
[TD]Type[/TD]
[TD]Date of New Business (Cohort)[/TD]
[TD]Cancellation Date[/TD]
[TD][/TD]
[TD][/TD]
[TD]Time[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]New Business[/TD]
[TD]Q1 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Q1 FY17[/TD]
[TD]Q2 FY17[/TD]
[TD]Q3 FY17[/TD]
[TD]Q4 FY17[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]New Business[/TD]
[TD]Q1 FY17[/TD]
[TD][/TD]
[TD]Cohort[/TD]
[TD]Q1 FY17[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]New Business[/TD]
[TD]Q1 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD]Q2 FY17[/TD]
[TD] [/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]New Business[/TD]
[TD]Q1 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD]Q3 FY17[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]New Business[/TD]
[TD]Q1 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD]Q4 FY17[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]New Business[/TD]
[TD]Q2 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]New Business[/TD]
[TD]Q2 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]New Business[/TD]
[TD]Q2 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]New Business[/TD]
[TD]Q3 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]New Business[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]New Business[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]New Business[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]New Business[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]New Business[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Cancellation[/TD]
[TD]Q1 FY17[/TD]
[TD]Q2 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Cancellation[/TD]
[TD]Q1 FY17[/TD]
[TD]Q3 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Cancellation[/TD]
[TD]Q1 FY17[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Cancellation[/TD]
[TD]Q2 FY17[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}@page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;}tr {mso-height-source:auto;}col {mso-width-source:auto;}br {mso-data-placement:same-cell;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignoreadding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}.xl65 {font-family:Arial, sans-serif; mso-font-charset:0;}.xl66 {font-size:8.0pt; font-weight:700; font-family:Arial, sans-serif; mso-font-charset:0; text-align:center; vertical-align:middle; mso-protection:unlocked visible;}.xl67 {background:#FFF2CC; mso-pattern:black none;}.xl68 {border-top:none; border-right:none; border-bottom:.5pt solid windowtext; border-left:none; background:#FFF2CC; mso-pattern:black none;}--></style>
[TABLE="width: 934"]
<colgroup><col><col><col><col><col span="6"></colgroup><tbody>[TR]
[TD]Account ID (15)[/TD]
[TD]Type[/TD]
[TD]Date of New Business (Cohort)[/TD]
[TD]Cancellation Date[/TD]
[TD][/TD]
[TD][/TD]
[TD]Time[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]New Business[/TD]
[TD]Q1 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Q1 FY17[/TD]
[TD]Q2 FY17[/TD]
[TD]Q3 FY17[/TD]
[TD]Q4 FY17[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]New Business[/TD]
[TD]Q1 FY17[/TD]
[TD][/TD]
[TD]Cohort[/TD]
[TD]Q1 FY17[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]New Business[/TD]
[TD]Q1 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD]Q2 FY17[/TD]
[TD] [/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]New Business[/TD]
[TD]Q1 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD]Q3 FY17[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]New Business[/TD]
[TD]Q1 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD]Q4 FY17[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]New Business[/TD]
[TD]Q2 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]New Business[/TD]
[TD]Q2 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]New Business[/TD]
[TD]Q2 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]New Business[/TD]
[TD]Q3 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]New Business[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]New Business[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]New Business[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]New Business[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]New Business[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Cancellation[/TD]
[TD]Q1 FY17[/TD]
[TD]Q2 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Cancellation[/TD]
[TD]Q1 FY17[/TD]
[TD]Q3 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Cancellation[/TD]
[TD]Q1 FY17[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Cancellation[/TD]
[TD]Q2 FY17[/TD]
[TD]Q4 FY17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
<style><!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";}@page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;}tr {mso-height-source:auto;}col {mso-width-source:auto;}br {mso-data-placement:same-cell;}td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignoreadding; color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Arial; mso-generic-font-family:auto; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}.xl65 {font-family:Arial, sans-serif; mso-font-charset:0;}.xl66 {font-size:8.0pt; font-weight:700; font-family:Arial, sans-serif; mso-font-charset:0; text-align:center; vertical-align:middle; mso-protection:unlocked visible;}.xl67 {background:#FFF2CC; mso-pattern:black none;}.xl68 {border-top:none; border-right:none; border-bottom:.5pt solid windowtext; border-left:none; background:#FFF2CC; mso-pattern:black none;}--></style>