Calcium and magnesium absorption and utilization is dependent on a number of factors including endocrine status. For instance the thyroid/parathyroid controls much of the calcium balances, for instance if you have a high thyroid output, you will dispel calcium via the kidney/urine while slow metabolizers tend to hold calcium.
The ratio between calcium and magnesium is critical since one may take copious amount of calcium thus creating a balance that is top heavy of calcium which will subdue magnesium.
I have seen some patterns where calcium and magnesium become too high, this occurs usually with slow metabolisers.
Magnesium control is endocrine based as well but typically through the adrenal axis. High activity (stress) will waste magnesium. Magnesium is lost under most stress circumstances which include emotional, mental, physical and biological. Biological would include immune/infection cycles and toxins.
Magnesium is very tricky in its absorption and loss and is perhaps the most sensitive of the minerals.
The only accurate, economical and convenient way to check status is through hair analysis. IMO I push TEI Trace Elements Inc for a number of reasons. I like their profiles they give, cost is reasonable and they make recommendations on how to balance.
One of the issues that most people miss are the forms of minerals that are given. For instance mag oxide is much different than mag lysinate which is different than mag taurinate. True all are forms of magnesium but because they are bound to different chelates, their action can be different. Some people do well with some forms while other forms are of no benefit.
I like to stick with straight chelates as in 'chelated magnesium' or lysinate, and some do well with a multi blend such as UltraMag from Source Naturals.
Same holds true for calcium, with some of the worst forms as carbonates and citrates .
Vitamin D plays a key role in the metabolism of each and should be checked via serum studies. Vit D also plays key roles in immune, endocrine, neuro and many other things.
A benefit to do hair analysis is you get analysis on the other vital minerals such as copper/zinc balances, selenium status which is critical and many other mineral patterns that can show up.