I have a report that was already wrote that shows that last 12 months sales from today's date. But I want this same report to show what the sales were for a date range. Example would be: 1/1/2014 - 12/31/2014
I want replace the current formula with that date range any suggestions: I have included the formula below.
OrganizationLocations INNER JOIN (SELECT arpCustomerOrganizationID,arpShipLocationID, SUM(arpInvoiceTotalBase) AS InvoiceTotalBase, SUM(arpInvoiceBalanceBase) AS arpInvoiceBalanceBase FROM ARInvoices WHERE arpOverpayment = 0 And arpInvoiceDate >= DATEADD(yyyy,-1,GETDATE()) GROUP BY arpCustomerOrganizationID,arpShipLocationID) As Test ON cmlOrganizationID=arpCustomerOrganizationID And cmlLocationID = arpShipLocationID Left Outer Join ORGANIZATIONLOCSALESPEOPLE On CMLORGANIZATIONID = CMKORGANIZATIONID And CMLLOCATIONID = CMKLOCATIONID
Thank you for your time
I want replace the current formula with that date range any suggestions: I have included the formula below.
OrganizationLocations INNER JOIN (SELECT arpCustomerOrganizationID,arpShipLocationID, SUM(arpInvoiceTotalBase) AS InvoiceTotalBase, SUM(arpInvoiceBalanceBase) AS arpInvoiceBalanceBase FROM ARInvoices WHERE arpOverpayment = 0 And arpInvoiceDate >= DATEADD(yyyy,-1,GETDATE()) GROUP BY arpCustomerOrganizationID,arpShipLocationID) As Test ON cmlOrganizationID=arpCustomerOrganizationID And cmlLocationID = arpShipLocationID Left Outer Join ORGANIZATIONLOCSALESPEOPLE On CMLORGANIZATIONID = CMKORGANIZATIONID And CMLLOCATIONID = CMKLOCATIONID
Thank you for your time