I have the following situation. Imagine a travel agency with bookings (bookid), different versions per bookid (bookversid), different bookdates per version (bookdate) and different amount per version, amountCY. See table below:
With no selection on bookdate I want to sum the amountCY of the latest bookdate. In this case 2700,-
If my selection on Bookdate is >= 16-1-2014 I want amount CY 2700 as a result.
With a Bookdate >= 17-12-2013, <= 16-1-2014 I want amount CY 4152,50 as a result.
The last thing I tried was:
But that does no give me the result I want. With a Bookdate selection of >1-1-2014 this formula returns two rows, 16-1-2014 and 21-7-2014. But I want only the last row.