I think you mean "at the expense of."
The report was finished on time, at the expense of my date with my husband, because we stayed until midnight to complete it.
Is that what you mean? It "cost" something else to achieve the first thing.
Student or Learner