Ba2MgNb6(NO7)2 crystallizes in the monoclinic Cm space group. There are two inequivalent Ba sites. In the first Ba site, Ba(1) is bonded in a 6-coordinate geometry to two equivalent O(1), two equivalent O(5), and two equivalent O(8) atoms. In the second Ba site, Ba(2) is bonded in a 6-coordinate geometry to two equivalent O(12), two equivalent O(14), and two equivalent O(9) atoms. Mg(1) is bonded to one N(1), one O(6), one O(7), and two equivalent O(11) atoms to form MgNO4 trigonal bipyramids that share  a cornercorner with one Nb(6)NO5 octahedra and corners with two equivalent Mg(1)NO4 trigonal bipyramids. The corner-sharing octahedral tilt angles are 1°. There are six inequivalent Nb sites. In the first Nb site, Nb(1) is bonded to one N(2), one O(14), one O(4), one O(5), and two equivalent O(2) atoms to form distorted corner-sharing NbNO5 octahedra. The corner-sharing octahedral tilt angles are 30°. In the second Nb site, Nb(2) is bonded in a 6-coordinate geometry to one O(2), one O(3), one O(6), one O(7), and two equivalent O(4) atoms. In the third Nb site, Nb(3) is bonded in a 6-coordinate geometry to one O(11), one O(4), one O(5), one O(9), and two equivalent O(7) atoms. In the fourth Nb site, Nb(4) is bonded in a 6-coordinate geometry to one N(1), one O(12), one O(6), one O(8), and two equivalent O(10) atoms. In the fifth Nb site, Nb(5) is bonded in a 6-coordinate geometry to one N(2), two equivalent N(1), one O(10), one O(11), and one O(13) atom. In the sixth Nb site, Nb(6) is bonded to one N(1), one O(1), one O(12), one O(3), and two equivalent O(13) atoms to form NbNO5 octahedra that share corners with two equivalent Nb(6)NO5 octahedra and  a cornercorner with one Mg(1)NO4 trigonal bipyramid. The corner-sharing octahedral tilt angles are 7°. There are two inequivalent N sites. In the first N site, N(1) is bonded to one Mg(1), one Nb(4), one Nb(6), and two equivalent Nb(5) atoms to form NMgNb4 trigonal bipyramids that share corners with two equivalent N(1)MgNb4 trigonal bipyramids and  an edgeedge with one O(12)Ba2Nb2 tetrahedra. In the second N site, N(2) is bonded in a linear geometry to one Nb(1) and one Nb(5) atom. There are fourteen inequivalent O sites. In the first O site, O(1) is bonded in a 3-coordinate geometry to two equivalent Ba(1) and one Nb(6) atom. In the second O site, O(2) is bonded in a distorted T-shaped geometry to one Nb(2) and two equivalent Nb(1) atoms. In the third O site, O(3) is bonded in a linear geometry to one Nb(2) and one Nb(6) atom. In the fourth O site, O(4) is bonded to one Nb(1), one Nb(3), and two equivalent Nb(2) atoms to form distorted ONb4 trigonal pyramids that share corners with two equivalent O(4)Nb4 trigonal pyramids and  an edgeedge with one O(5)Ba2Nb2 tetrahedra. In the fifth O site, O(5) is bonded to two equivalent Ba(1), one Nb(1), and one Nb(3) atom to form distorted OBa2Nb2 tetrahedra that share corners with two equivalent O(5)Ba2Nb2 tetrahedra and  an edgeedge with one O(4)Nb4 trigonal pyramid. In the sixth O site, O(6) is bonded in a T-shaped geometry to one Mg(1), one Nb(2), and one Nb(4) atom. In the seventh O site, O(7) is bonded in a 4-coordinate geometry to one Mg(1), one Nb(2), and two equivalent Nb(3) atoms. In the eighth O site, O(8) is bonded in a distorted single-bond geometry to two equivalent Ba(1) and one Nb(4) atom. In the ninth O site, O(9) is bonded in a distorted single-bond geometry to two equivalent Ba(2) and one Nb(3) atom. In the tenth O site, O(10) is bonded in a 2-coordinate geometry to one Nb(5) and two equivalent Nb(4) atoms. In the eleventh O site, O(11) is bonded in a rectangular see-saw-like geometry to two equivalent Mg(1), one Nb(3), and one Nb(5) atom. In the twelfth O site, O(12) is bonded to two equivalent Ba(2), one Nb(4), and one Nb(6) atom to form OBa2Nb2 tetrahedra that share corners with two equivalent O(12)Ba2Nb2 tetrahedra and  an edgeedge with one N(1)MgNb4 trigonal bipyramid. In the thirteenth O site, O(13) is bonded in a T-shaped geometry to one Nb(5) and two equivalent Nb(6) atoms. In the fourteenth O site, O(14) is bonded in a distorted single-bond geometry to two equivalent Ba(2) and one Nb(1) atom.
Ba2MgNb6(NO7)2 crystallizes in the monoclinic Cm space group. There are two inequivalent Ba sites. In the first Ba site, Ba(1) is bonded in a 6-coordinate geometry to two equivalent O(1), two equivalent O(5), and two equivalent O(8) atoms. Both Ba(1)-O(1) bond lengths are 2.68 Å. Both Ba(1)-O(5) bond lengths are 2.90 Å. Both Ba(1)-O(8) bond lengths are 2.75 Å. In the second Ba site, Ba(2) is bonded in a 6-coordinate geometry to two equivalent O(12), two equivalent O(14), and two equivalent O(9) atoms. Both Ba(2)-O(12) bond lengths are 2.71 Å. Both Ba(2)-O(14) bond lengths are 2.77 Å. Both Ba(2)-O(9) bond lengths are 2.82 Å. Mg(1) is bonded to one N(1), one O(6), one O(7), and two equivalent O(11) atoms to form MgNO4 trigonal bipyramids that share  a cornercorner with one Nb(6)NO5 octahedra and corners with two equivalent Mg(1)NO4 trigonal bipyramids. The corner-sharing octahedral tilt angles are 1°. The Mg(1)-N(1) bond length is 2.06 Å. The Mg(1)-O(6) bond length is 2.01 Å. The Mg(1)-O(7) bond length is 2.01 Å. Both Mg(1)-O(11) bond lengths are 2.05 Å. There are six inequivalent Nb sites. In the first Nb site, Nb(1) is bonded to one N(2), one O(14), one O(4), one O(5), and two equivalent O(2) atoms to form distorted corner-sharing NbNO5 octahedra. The corner-sharing octahedral tilt angles are 30°. The Nb(1)-N(2) bond length is 1.92 Å. The Nb(1)-O(14) bond length is 1.84 Å. The Nb(1)-O(4) bond length is 2.35 Å. The Nb(1)-O(5) bond length is 2.29 Å. Both Nb(1)-O(2) bond lengths are 2.07 Å. In the second Nb site, Nb(2) is bonded in a 6-coordinate geometry to one O(2), one O(3), one O(6), one O(7), and two equivalent O(4) atoms. The Nb(2)-O(2) bond length is 2.17 Å. The Nb(2)-O(3) bond length is 1.81 Å. The Nb(2)-O(6) bond length is 1.97 Å. The Nb(2)-O(7) bond length is 2.62 Å. Both Nb(2)-O(4) bond lengths are 2.09 Å. In the third Nb site, Nb(3) is bonded in a 6-coordinate geometry to one O(11), one O(4), one O(5), one O(9), and two equivalent O(7) atoms. The Nb(3)-O(11) bond length is 2.13 Å. The Nb(3)-O(4) bond length is 2.53 Å. The Nb(3)-O(5) bond length is 1.92 Å. The Nb(3)-O(9) bond length is 1.81 Å. Both Nb(3)-O(7) bond lengths are 2.06 Å. In the fourth Nb site, Nb(4) is bonded in a 6-coordinate geometry to one N(1), one O(12), one O(6), one O(8), and two equivalent O(10) atoms. The Nb(4)-N(1) bond length is 2.43 Å. The Nb(4)-O(12) bond length is 2.07 Å. The Nb(4)-O(6) bond length is 2.08 Å. The Nb(4)-O(8) bond length is 1.84 Å. Both Nb(4)-O(10) bond lengths are 2.02 Å. In the fifth Nb site, Nb(5) is bonded in a 6-coordinate geometry to one N(2), two equivalent N(1), one O(10), one O(11), and one O(13) atom. The Nb(5)-N(2) bond length is 1.86 Å. Both Nb(5)-N(1) bond lengths are 2.08 Å. The Nb(5)-O(10) bond length is 2.71 Å. The Nb(5)-O(11) bond length is 2.19 Å. The Nb(5)-O(13) bond length is 2.19 Å. In the sixth Nb site, Nb(6) is bonded to one N(1), one O(1), one O(12), one O(3), and two equivalent O(13) atoms to form NbNO5 octahedra that share corners with two equivalent Nb(6)NO5 octahedra and  a cornercorner with one Mg(1)NO4 trigonal bipyramid. The corner-sharing octahedral tilt angles are 7°. The Nb(6)-N(1) bond length is 2.27 Å. The Nb(6)-O(1) bond length is 1.89 Å. The Nb(6)-O(12) bond length is 2.05 Å. The Nb(6)-O(3) bond length is 2.14 Å. Both Nb(6)-O(13) bond lengths are 2.01 Å. There are two inequivalent N sites. In the first N site, N(1) is bonded to one Mg(1), one Nb(4), one Nb(6), and two equivalent Nb(5) atoms to form NMgNb4 trigonal bipyramids that share corners with two equivalent N(1)MgNb4 trigonal bipyramids and  an edgeedge with one O(12)Ba2Nb2 tetrahedra. In the second N site, N(2) is bonded in a linear geometry to one Nb(1) and one Nb(5) atom. There are fourteen inequivalent O sites. In the first O site, O(1) is bonded in a 3-coordinate geometry to two equivalent Ba(1) and one Nb(6) atom. In the second O site, O(2) is bonded in a distorted T-shaped geometry to one Nb(2) and two equivalent Nb(1) atoms. In the third O site, O(3) is bonded in a linear geometry to one Nb(2) and one Nb(6) atom. In the fourth O site, O(4) is bonded to one Nb(1), one Nb(3), and two equivalent Nb(2) atoms to form distorted ONb4 trigonal pyramids that share corners with two equivalent O(4)Nb4 trigonal pyramids and  an edgeedge with one O(5)Ba2Nb2 tetrahedra. In the fifth O site, O(5) is bonded to two equivalent Ba(1), one Nb(1), and one Nb(3) atom to form distorted OBa2Nb2 tetrahedra that share corners with two equivalent O(5)Ba2Nb2 tetrahedra and  an edgeedge with one O(4)Nb4 trigonal pyramid. In the sixth O site, O(6) is bonded in a T-shaped geometry to one Mg(1), one Nb(2), and one Nb(4) atom. In the seventh O site, O(7) is bonded in a 4-coordinate geometry to one Mg(1), one Nb(2), and two equivalent Nb(3) atoms. In the eighth O site, O(8) is bonded in a distorted single-bond geometry to two equivalent Ba(1) and one Nb(4) atom. In the ninth O site, O(9) is bonded in a distorted single-bond geometry to two equivalent Ba(2) and one Nb(3) atom. In the tenth O site, O(10) is bonded in a 2-coordinate geometry to one Nb(5) and two equivalent Nb(4) atoms. In the eleventh O site, O(11) is bonded in a rectangular see-saw-like geometry to two equivalent Mg(1), one Nb(3), and one Nb(5) atom. In the twelfth O site, O(12) is bonded to two equivalent Ba(2), one Nb(4), and one Nb(6) atom to form OBa2Nb2 tetrahedra that share corners with two equivalent O(12)Ba2Nb2 tetrahedra and  an edgeedge with one N(1)MgNb4 trigonal bipyramid. In the thirteenth O site, O(13) is bonded in a T-shaped geometry to one Nb(5) and two equivalent Nb(6) atoms. In the fourteenth O site, O(14) is bonded in a distorted single-bond geometry to two equivalent Ba(2) and one Nb(1) atom.