I would like to do some calculation in Report Generator based on archive values.
Calculations are based on increase of the value over some time, so I want to use two last values from aggregated archive. 

Problem is, that when I used function archivesp(2,"value","bottom",1,0,0) in previous build (8.20, 65486) I got only two last values of archive. After update to 66627 the same function returns full row starting from the oldest.
Function archivesp(2,"value","bottom",0,0,0) returns last value of the archive.

Could you help me with getting last two values from aggregated archive?

Thank you in advance.