Fix error when no data exist in compare period