One possible option would be to change your measures to strings. By placing str() around the measures in the formula, the calculation should be valid. Hope this helps!
Thanks Tracy -
I've tried this but then Tableau tries to sort by measures as a string not as a number.