I mix my own during the summer but at the moment I can't place the exact quantities except to say that those were calculated based on the RDA label of a popular brand of fizzy tablets.
I use Redmonds salt, Nu-Salt for potassium chloride, and magnesium citrate powder (emptied from capsules) but not calcium (since I take that separately anyway). Sugar helps with absorption, a teaspoon per serving is not enough calories to interfere with fasting. To prevent the sugar from molding if the mix is stored for a while, add it to the water in the moment.
Some recipes online say to mix a big batch and shake well each time so that everything is correctly proportioned. That sounds chancy, so what I do is use those flip-top pill organizers and measure into each compartment the dose for one serving of water. (Yes, this task is easier with 1/8 and 1/16 teaspoon measuring spoons, look for "mini measuring spoons" on amazon or whatever.)
Important: If you do use electrolytes, remember to consider how much of these minerals (sodium especially but potassium too) are in the meal(s) that you ARE eating. Even if young and healthy, these are not to be played with since blood pressure and heart rate can be affected.