Several internet discussions discuss homemade dishwasher detergent and that it doesn't work. I have made some and have been using it for a month will good results. The recipe I use calls for table salt, borax, baking soda, and powdered lemonade. I made 1 quart of initially---in case it was bad, I wouldn't have a who ton left over. For one quart, I used a half-cup salt, and then equal portions of the borax and baking soda, which I layered in the jar to facilitate mixing. I didn't have any lemonade, so I used a packet of mango-ade (from Mexican grocery store). I then covered the jar, and mixed by rolling and turning the jar. Leave some air space so that you are able to mix.
I use 1/4 cup of powder for 1 load of dishes in the dishwasher. I have EXTREMELY hard water, but I do have a water softener. I suppose you will have to experiment with the amount the achieve the effects that you desire. I also put white vinegar in the liquid-rinse aid (ie jet dry) compartment.
Cheap, effective, and probably better for the environment.