If it is a measure, I assume that it is some kind of aggregation, e.g. Sum() or Count(). Then you can just divide one aggregation with the other:
I would avoid if() inside the Sum() as far as possible. It's slow. Further, the Set analysis is just a way to make the chart make a calculation based on an other selection than the current. So that won't help you either.
When I do that, and I put a single date on the axis, what happens is that one of the measures is always for all time (since its calendar isn't on the chart). Amount and Hours have two separate calendars. Giving them the same calendar ends up making the data wrong, due to there being Amounts when there aren't Hours, or vice versa.