Hi pros,
I have a table like this:
Date1 Date2 Amount 1 5 10 2 3 15 3 4 20
and somewhere else, my Date0 = 4
My calculation is total of all rows and each row is: (min ([Date0]+1,@[Date2]) - @[Date1]) x Amount. My expected result is 75, which is (4 x 10) + (1 x 15) + (1 x 20).
May I do this calculation with just 1 SUMPRODUCT without supporting column?
Need your help, thanks alot.
Bookmarks