Just to clarify, do you have a QB Desktop file with 2 company files separated by Class? You should migrate it manually to QB Online.
Filter the data and create a second company file on your QB Desktop. You may utilize a 3rd party party migration tool to do so. Then you may migrate the new company file to QBO.