Urine Magnesium Test is done to detect the presence of magnesium levels in urine and at the same time detects nutrition levels along with kidney problems. Magnesium levels are considered to check kidney disorders, uncontrolled diabetes or in the diagnosis of gastrointestinal disorders. This test is also prescribed to check low blood levels of calcium, potassium and magnesium deficiency which may result in several problems. It is caused when kidneys are excreting huge levels of magnesium or diseases that cause impaired or even if there is harmful absorption in intestines. These test results are also useful in determining decreased blood magnesium as well as chronic kidney failures.