It would be possible, but you have to take present that magnesium and calcium salts are extremely insoluble in basic pH's, so the electrodeposition kinetics will be very slow.
It looks like both ions co-exist in your solution. In this case it would be difficulty to judge because of formation of carbonates and bicarbonates of both ions (it is complex formation and both have different characteristics).
Mg(OH)2 would precipitate only if the pH exceed approximately 9.5. Ca may deposit 0.0003 gram molecules per liter and Mg 0.00015 gram molecules per liter if we analyse the deposited precipitates.