Unit of measurement calculation for ledger