Yes a dirty or clogged transmission filter will cause shifting problems with your transmission but I would also make sure the transmission has enough transmission fluid in it because low transmission fluid can also cause transmission shifting problems.
You should change automatic transmission fluid and the filter every 2 years or every 30,000 to 40,000 miles or whichever comes first.
Most people know to change their engine oil every 3,000 miles or so but not many people think about changing their transmission fluid.
But changing your automatic transmission fluid and filter every 30,000 miles or so will help extend the life of your automatic transmission and keep the automatic transmission shifting properly and prevent breakdowns.
Even if my automatic transmission fluid hasn't reached 30,000 miles I'll still change it before then at around 15,000 miles or so.
That is especially true if I'm planning a long road trip as I do not want anything to go wrong and cause a breakdown so I go over the vehicle and do a lot of preventative maintenance.