Well, I was running out of dishwasher detergent, so instead of running out to buy more, I decided to try making my own.
I'm going to give you the recipe I use, keeping in mind that this doesn't apparently seem to be a "one-size-fits-all" kind of a thing. Detergent will work differently in different kinds of water (soft vs. hard), so you might just want to start with a small batch of the recipe that follows, and tweak the ingredients as needed until you come up with the recipe that works best for you.
Homemade Dishwasher Soap Recipe
1/2 cup borax ($.18)
1/2 cup washing soda ($.33)
1/4 cup food grade citric acid ($.66) (note:for hard water, try increasing the amount of borax or add 1/4 cup course kosher salt, not regular salt!)
Combine ingredients and use sparingly. I use only about 1 to 1 1/2 tsp. per load. (For hard water, you may need more.)
borax ($.18) + washing soda ($.33) + food grade citric acid ($.66) = $2.01 for all ingredients; 81 "servings" per batch (@ 1 1/2 tsp. per load); therefore the total cost per load is only
$ 0.014 - Sweet!
FYI: Did you know that white vinegar can be used as a rinse aid? Just add it to the appropriate dispenser and refill as needed.