In Bartters syndrome there is defect in
Ref. Guyton. 13th edition. Page. 1103
Na+--K+--2Cl- transporter 
This is an electro neutral transport resulting in the reabsorption of about 25% of the filtered sodium, chloride, and potassium.

The luminal membrane contains a K+ channel (Figure VIII-4-4), allowing diffusion of this ion back into lumen (recall that the concentration of K+ inside cells is very high compared to the extracellular concentration).  
This back diffusion of K+ into the lumen creates a positive luminal potential, which in turn, promotes calcium and magnesium reabsorption (about 25% of FL) via a paracellular pathway (primarily). This positive luminal potential also causes sodium reabsorption via a paracellular pathway.  

Bartter’s syndrome

It is a genetic mutation resulting in diminished function of the Na+--K+--2Cl- transporter in Ascending loop of Henle
This leads to a low volume state, which causes an increase in renin and aldosterone (know as a secondary hyperaldosteronism).
Patients exhibit hypokalemia, alkalosis, and elevated urine calcium.
DCT
Thick ascending limb of LOH
PCT
Descending limb of LOH