• RonKyle (12/22/2010)


    ....The record would need some kind of active flag as well because the normal count function would not work in this case.

    Good point. By including "differential" records, counts can get thrown off. In the case of reversing out SalespersonID 101 transactions and attributing to SalespersonID 100, an "active flag" or IsRowCurrent flag would help when counting. But, even this might have limitations, such as the very first example where the sale price was reduced by $20 -- which row gets the active flag? In these cases, then, perhaps a value would need to be allocated between rows that match by SalesPersonID, ProductID, and SaleDate in order to achieve a sum of 1 for each sale?