Magnesium testing may be requested as a follow-up to persistently low levels of calcium and potassium. It may also be requested if you have symptoms of an abnormally low magnesium level such as muscle weakness, twitching, cramping, confusion, cardiac arrhythmias, and seizures.Although dietary deficiencies of magnesium are rare, your doctor may request a magnesium blood test to check for a deficiency as part of an evaluation of malabsorption, malnutrition, diarrhoea, or alcoholism. If you are taking certain drugs that can cause the kidneys to excrete magnesium, testing may also be performed. If magnesium and/or calcium supplementation is necessary, then the level of magnesium in the blood is likely to be checked at intervals to monitor the effectiveness of treatment.If you have a kidney disorder or uncontrolled diabetes, your doctor may request a blood test to measure magnesium to help monitor kidney function and to make sure that you are not excreting or retaining excessive amounts of magnesium.