Optoelectronic measuring device having an electronic magnetic compass for determining an azimuthal alignment (a) of the measuring device and a compensation unit, which is associated with the magnetic compass, for compensating for device-fixed interference fields, wherein - the measuring device is a handheld optoelectronic observation device having a display unit for displaying the azimuthal alignment (a), wherein the observation device comprises aiming binoculars having an aiming axis and is configured to determine target coordinates of a remote target object, wherein a laser distance meter is integrated in the observation device, - the measuring device is designed to assume at least two defined, repeatable operating states, wherein the measuring device has a different device-fixed interference field in each of the operating states, and - the measuring device comprises at least one activatable electrical system (22, 24, 26), - the first and the second operating state of the measuring device differ from one another at least with respect to a present state of the electrical system, and - the compensation unit has a compensation functionality for carrying out an initial compensation of the electronic magnetic compass in a first operating state of the measuring device at the location of the measurement, wherein in the scope of the initial compensation, initial compensation data are ascertained and stored, characterized in that the compensation unit comprises - a detection unit for detecting a present operating state of the measuring device, - a memory unit in which a magnetic offset is provided that is stored at the factory and results from the different device-fixed interference fields between the first operating state and a second operating state of the measuring device, and - a computer unit for computing the azimuthal alignment (a) of the measuring device depending on an ascertained operating state and based on the magnetic offset, wherein - the detection unit is designed to recognize a present state of the electrical system, - the first and the second operating state of the measuring device differ from one another in a present current strength and/or voltage in the electrical system, and - the detection unit is designed to ascertain a present current strength and/or voltage in the electrical system. - the measuring device is a handheld optoelectronic observation device having a display unit for displaying the azimuthal alignment (a), wherein the observation device comprises aiming binoculars having an aiming axis and is configured to determine target coordinates of a remote target object, wherein a laser distance meter is integrated in the observation device, - the measuring device is designed to assume at least two defined, repeatable operating states, wherein the measuring device has a different device-fixed interference field in each of the operating states, and - the measuring device comprises at least one activatable electrical system (22, 24, 26), - the first and the second operating state of the measuring device differ from one another at least with respect to a present state of the electrical system, and - the compensation unit has a compensation functionality for carrying out an initial compensation of the electronic magnetic compass in a first operating state of the measuring device at the location of the measurement, wherein in the scope of the initial compensation, initial compensation data are ascertained and stored, - a detection unit for detecting a present operating state of the measuring device, - a memory unit in which a magnetic offset is provided that is stored at the factory and results from the different device-fixed interference fields between the first operating state and a second operating state of the measuring device, and - a computer unit for computing the azimuthal alignment (a) of the measuring device depending on an ascertained operating state and based on the magnetic offset, - the detection unit is designed to recognize a present state of the electrical system, - the first and the second operating state of the measuring device differ from one another in a present current strength and/or voltage in the electrical system, and - the detection unit is designed to ascertain a present current strength and/or voltage in the electrical system.