check the valve!
The drain system in the Kitchenaids were pretty straight forward and would usually work for years without a problem. But if there is a blockage in the line or it drains into a slow drain, your machine will not always drain out or will not drain completely. First of all, when it is supposed to drain,do you hear the characteristic snap sound of the drain valve energizing? This pulls on a lever which opens the valve and lets the water flow thru it. If it clicks, then you may have either something caught in the valve or something caught in the drain line after the valve.
Did you happen to install a new disposer prior to this no drain situation? I cannot tell you how many people do that but forget to knock out the plug on the disposer that seals that extension on the neck of the disposer. Lots of needless service calls for that error!
If the machine drains directly into a connection on the sink drain,see if you can remove the hose and drain it into a 5 gallon pail and if the machine drains out, then your problem lies with the sink drain.
I have an aunt who always had a problem with her KDS18 not fully draining because the sink drain would back up on her all the time and even the water in the dishwasher was enough to fill the sink parrtially. Fighting against that back pressure would cause water to remain in the dishwasher after every drain cycle. She would hit a cancel/ drain after the washer was finished to remove any left ofver water. Not the best situation in the world.
If that isn't the cause and you don't hear any snap sound, then you may just have a wire off the valve as suggested above.Pull off the bottom panels and you should see the drain valve mounted to a bracket under the machine. The wires going to it should be white(neutral) and a pink power wire. They sometimes used really cheap connectors and they would fall off so maybe the wire is off or broken.
See if the actuator moves easily by pulling on it with you finger...SHUT THE POWER OFF FIRST...and see if it moves. If it doesn't, you will have to pull the valve out and see what the story is.
Let us know what you find!