I have an Access table that I pull, but then bring into Excel to do a running total number of days due to the nuances of the data needs, but when I first began this process, this was manageable because we were dealing with a few thousand rows, however, when I refreshed the dataset from Access this morning, we are now at 231,421 rows, so my Excel-based calculation now makes this a very inefficient process, but I am not sure of the best way to (or if there is a way to) bring this particular equation into Access. I will try to set this up as best as I can, but the Excel equation is as follows:
THE FOLLOWING EQUATION RUNS IN THE "PRODUCTION DAY" COLUMN
=IFERROR(IF(AND([@[PROD_DT]]>=[@[FIRST_PROD]],[@[BOE/D]]>0,[@[COMP_NAME]]=A1),COUNTIF([@[BOE/D]],">0")+Q1,IF(AND([@[PROD_DT]]>=[@[FIRST_PROD]],[@[COMP_NAME]]<>A1),COUNTIF([@[BOE/D]],">0"),"")),1)
Desired end result is for this to return a running number of days a "COMP_NAME" has a positive value in BOE/D.
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
Any insight or help would be greatly appreciated.
<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
THE FOLLOWING EQUATION RUNS IN THE "PRODUCTION DAY" COLUMN
=IFERROR(IF(AND([@[PROD_DT]]>=[@[FIRST_PROD]],[@[BOE/D]]>0,[@[COMP_NAME]]=A1),COUNTIF([@[BOE/D]],">0")+Q1,IF(AND([@[PROD_DT]]>=[@[FIRST_PROD]],[@[COMP_NAME]]<>A1),COUNTIF([@[BOE/D]],">0"),"")),1)
Desired end result is for this to return a running number of days a "COMP_NAME" has a positive value in BOE/D.
COMP_NAME | PROD_DT | FIRST_PROD | PRODUCTION DAY | BOE/D |
WELL_1 | 1/9/2012 | 1/15/2012 | ||
WELL_1 | 1/10/2012 | 1/15/2012 | ||
WELL_1 | 1/11/2012 | 1/15/2012 | ||
WELL_1 | 1/12/2012 | 1/15/2012 | ||
WELL_1 | 1/13/2012 | 1/15/2012 | ||
WELL_1 | 1/14/2012 | 1/15/2012 | ||
WELL_1 | 1/15/2012 | 1/15/2012 | 1 | 24.22 |
WELL_1 | 1/16/2012 | 1/15/2012 | 2 | 29.12 |
WELL_1 | 1/17/2012 | 1/15/2012 | 3 | 38.52 |
WELL_1 | 1/18/2012 | 1/15/2012 | 4 | 57.62 |
WELL_1 | 1/19/2012 | 1/15/2012 | 5 | 42.59 |
WELL_1 | 1/20/2012 | 1/15/2012 | 6 | 108.55 |
WELL_1 | 1/21/2012 | 1/15/2012 | 7 | 66.03 |
WELL_1 | 1/22/2012 | 1/15/2012 | 8 | 54.20 |
WELL_1 | 1/23/2012 | 1/15/2012 | 8 | |
WELL_1 | 1/24/2012 | 1/15/2012 | 8 | |
WELL_1 | 1/25/2012 | 1/15/2012 | 9 | 1.18 |
WELL_1 | 1/26/2012 | 1/15/2012 | 10 | 201.95 |
WELL_1 | 1/27/2012 | 1/15/2012 | 11 | 313.25 |
WELL_1 | 1/28/2012 | 1/15/2012 | 12 | 175.63 |
WELL_1 | 1/29/2012 | 1/15/2012 | 13 | 84.28 |
WELL_1 | 1/30/2012 | 1/15/2012 | 14 | 168.18 |
<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>
Any insight or help would be greatly appreciated.
<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>