Forum Discussion

Tony2021's avatar
Tony2021
Iron Contributor
Jul 08, 2022
Solved

Sum between 2 dates

Hello Experts, I need to sum [AmountOrig] but only for a specified date range.  Please see bold below.  Its not correct since it returns NULL. I am not entirely certain if Dsum is what I need though ...
  • arnel_gp's avatar
    Jul 09, 2022
    your Criteria on Dsum() should be one expression:

    DSum("AmountOrig","tblFXparent","Vendor = '" & [Vendor] & "' And DateSettle Between #5/20/2021# And #9/15/2021#") AS FCNotionals

    or you can create a separated Aggregate query and join it with your first query:

    select Vendor, Sum(AmountOrig) As FCNotionals From tblFXParent where DateSettle Between #5/20/2021# And #9/15/2021# Group by Vendor



Resources