Measurements of the major cations Ca and Mg by the technique of diffusive gradients in thin films (DGTs) were systematically evaluated. The concentration in solution was calculated using Fick’s first law of diffusion from the directly measured flux to the DGT device. A selective cation exchange resin (Bio-Rad Chelex®100), which has been used extensively with DGT for trace metals, such as Cd2+, Cu2+ and Ni2+, was used for this work. Elution of Ca and Mg from the resin with 1 M HNO3 was very reproducible. Measurements of Ca and Mg concentrations in synthetic solutions agreed well with the theoretical predictions. The negative response on uptake caused by lowered pH was investigated. Uptake was found to decline below pH 5. The capacity of the DGT device for Ca and Mg was also investigated to establish maximum deployment times for given concentrations. Experiments with filtered and modified lake water show that DGT can be used to measure Ca and Mg when trace metals are present in the solution. An in situ deployment of DGT combined with an ultrafiltration study suggest that the Mg concentration measured by DGT is similar to the concentration found in the fraction <1 kDa.