So the sequence should be:
1 Cancel Premium trial (i.e. unsubscribe from Premium before end of trial period)
2 Purchase Ultimate.
EDIT: I have just found this post, that suggests an upgrade is possible: A doubt about upgrading from Avast PREMIUM Security to Avast ULTIMATE
but says subscription remains listed as Premium, so could be confusing.