This is a case of getting the maths clear..

For example ...

Lets assume the selling price = 1.00 (or 100%) and the selling price = all costs and all commissions and the desired profit.

If thew desired profit = 25 cents in every dollar then the assumption is that costs and commissions are 75 cents and the markup % is 33%.

Are you able to calculate the total of costs and commissions THEN add your desired markup?

Of course ..if the commissions are based on the end selling price it is a little more complicated but the same rationalse applies and it may be necessary (but not good practice) to enable iterative calculations (Options / Formulas).

From a maths (algebra) perspective you should be able to apply the maths in either direction.

Let me know if I can help further.