Assuming you have built a database schema with referential integrity, you would have to populate dimension records before fact records or you would violate foreign key constraints.
In most data warehouse solutions, you would be using surrogate keys that are generated by inserting your dimension records, so if you have not populated the dimensions you would not have the surrogate key values available for your fact records.