Two quite different problems produce a white or cloudy appearance on glassware, and one of them is permanent. Before changing anything, do the test that separates them.

Wipe the item with a damp cloth, or soak it briefly in white vinegar and then wipe. If the film comes away and the glass is clear underneath, it is mineral deposit and everything below applies. If the cloudiness stays, the surface of the glass has been etched, which cannot be reversed.
Mineral deposit
This is limescale left behind when hard water dries. It builds up over many cycles and is worse in hard water areas, on items dried at high heat, and where rinse aid is absent.

Three things work together to prevent it, and they are commonly misunderstood as interchangeable.
Dishwasher salt regenerates the built-in water softener in machines that have one. It is coarse salt in its own reservoir, usually in the base of the tub, and it has nothing to do with the detergent. All-in-one tablets claim to include a softening function, and in soft water areas that is often enough. In hard water it usually is not.
The hardness setting tells the machine how often to regenerate the softener. It is set once, from the water hardness figure for your area, and most machines leave the factory on a low setting that suits soft water. In a hard water area an unadjusted machine will underperform indefinitely, and nobody ever changes it because nothing tells them to.
Rinse aid reduces the surface tension of the water so it sheets off rather than beading, which means less water is left to dry and deposit minerals. It is the single most effective thing for spotting on glass, and again all-in-one tablets include it but often not enough for hard water.
Etching
Permanent clouding of the glass surface. Once it has happened, nothing removes it.
The known contributors are soft water combined with too much detergent, high wash temperatures, and long exposure over many cycles. It affects some glass far more than others — thin, delicate and older glass is more vulnerable, and some items are simply not dishwasher-safe regardless of settings.
The counterintuitive part is that soft water makes it worse rather than better. With no minerals to buffer it, an over-concentrated detergent solution is more aggressive toward the glass surface.
If you have etched glassware, the useful response is to protect what is left: reduce detergent dose, lower the wash temperature, and hand-wash anything valuable.
Residue on plastics and cutlery rather than glass
A chalky film on plastic items specifically is usually a drying issue rather than a water issue — plastics hold less heat than china, so they stay wet longer and everything in the water dries onto them. More rinse aid usually helps.
Spotting on stainless cutlery is nearly always rinse aid, and a rust-coloured spot is a different problem again, usually contact with something that has rusted rather than the cutlery itself failing.
The order worth trying
Set the hardness correctly for your water first, because it changes what everything else has to do. Fill the salt reservoir if the machine has one and keep it topped up. Fill the rinse aid and increase the dose setting a step if spotting persists. Only then adjust detergent dose, and adjust it downward rather than upward, since more detergent is a cause of etching rather than a cure for deposit.
Running the machine empty with a descaler occasionally clears deposit that has built up inside it, which is worth doing in hard water areas regardless of how the dishes look.
