from typing import Optional


def calculate_measurement_value(sources) -> Optional[str]:
    """Calculate the measurement value from the source measurements."""
    value = 0
    for source in sources:
        if source["parse_error"] or source["connection_error"]:
            return None
        value += (int(source["value"]) - len(source.get("ignored_units", [])))
    return str(value)