For about 50 years the United States has been phasing out phosphates used in detergents, and they were completely banned about 10 years ago. The phosphates cause algae blooms that are supposedly harmful to fish.
The problem is that the phosphates were very effective in automatic dishwashing detergents. They not only helped clean the dishes, but they acted as a kind of water softener to prevent hard water stains, calcium build-up, on glassware on other dishes. About a dozen years ago there were a ton of complaints by consumers that dishwashers weren't getting dishes clean as they used to, and because of the hard water stains, the glassware looked dirtier after they were washed in the dishwasher than before.
I have been having this problem. There were noticeable hard water stains on my glassware and other dishes. So I tried washing once with dishwashing detergent, and a second time with no detergent, but I poured vinegar into a 16 once container and set it in the top rack of the dishwasher. After the second wash, everything was spotless. Since the vinegar is acidic, it dissolved any calcium stains.
It is believed by many people that "Tang" can be used to clean out your dishwasher. Since "Tang" is an acid, it might actually work. I had a dishwasher salesman tell me to put "Tang" powder in a cup on the top rack. (I would not do this with the detergent, because one is basic and the other is acidic. At the very least they would cancel each other out, if not react with each other in unpredictable ways.)
However, if you have stains in your dishwasher, bleach is much more effective. In my old house, I had a cheap GE dishwasher that was not stainless steel inside, but it had a cheap plastic interior. That interior got so badly stained that I thought that I was going to have to replace the dishwasher. After I played around with the dishwasher, I realized that each wash would go through three cycles: an initial rinse and drain cycle, a long wash cycle, followed by another drain and rinse and drain cycle. All dishwashers work this way. To solve my stain problem, I waited for the long wash cycle to start, and then I poured a bottle of bleach into the dishwasher. However, when it got to the final drain and rinse cycle, which could have drained out all the bleach, I turned the knob back to the wash cycle so that the bleach would not drain out. I did this a few times so that there was plenty of time for the bleach to circulate in the dishwasher. The end result was amazing because the dishwasher was spotless inside.