I always grin to myself when I read about not taking calcium and magnesium together because the two are together in many foods. It is true that if you take a large amount of calcium (e.g., 500 mg) with a smaller amount of magnesium (e.g., 250 mg), you will not absorb as much of the magnesium, but you will probably absorb the calcium better. We need magnesium to absorb and metabolize calcium and vitamin D. Below is a chart of calcium and magnesium in foods.  

Calcium and Magnesium in Foods (milligrams)

Collards (1 cup, boiled)
268 Ca
40 Mg
Orange juice, calcium-fortified (1 cup)
349 Ca
27 Mg
Oatmeal, fortified instant (1 packet)
98 Ca
36 Mg
Figs, dried (10 medium)
136 Ca
57 Mg
Tofu, calcium-set (1/2 cup)
861 Ca
73 Mg
Spinach (1 cup, boiled)
245 Ca
157 Mg
Soybeans (1 cup, boiled)
261 Ca
108 Mg
White beans (1 cup, boiled)
161 Ca
113 Mg
Mustard greens (1 cup, boiled)
165 Ca
18 Mg
Navy beans (1 cup, boiled)
128 Ca
96 Mg
Great northern beans (1 cup, boiled)
120 Ca
88 Mg
Black turtle beans (1 cup, boiled)
102 Ca
91 Mg
Swiss chard (1 cup, boiled)
102 Ca
152 Mg
Broccoli (1 cup, boiled)
62 Ca
33 Mg
Kale (1 cup boiled)
94 Ca
23 Mg
English muffin
101 Ca
21 Mg
Butternut squash (1 cup, boiled)
84 Ca
60 Mg
Pinto beans (1 cup, boiled)
79 Ca
86 Mg
Chick peas (1 cup, canned)
109 Ca
61 Mg
Sweet potato (1 cup, boiled)
76 Ca
54 Mg
Green beans (1 cup, boiled)
55 Ca
22 Mg
Barley (1 cup)
61 Ca
245 Mg
Brussels sprouts (8 sprouts)
60 Ca 
34 Mg
Navel orange (1 medium)
60 Ca
15 Mg
Raisins (2/3 cup)
54 Ca
35 Mg
Source: U.S. Department of Agriculture, Agricultural Research Service. 2011. USDA National Nutrient Database for Standard Reference, Release 26. 
*Nutrient Data Laboratory Home Page, http://ndb.nal.usda.gov/
https://www.pcrm.org/good-nutrition/nutrition-information/health...