sort profit data by base