I don't see any way to do what you want with the <dax> tags currently available. It could be done with a pair of Javascript functions, but they might be slow, especially on older computers.