fix bug on calculate comparable data

should compare the latest same period of data