Edge 520 Not calculating distance

Garmin Edge device which I am using for mapped and unmapped rides outdoors. Unmapped rides show speed but not the distance. What are my options to understand the fix the issue such that accurate distance is recorded?