An impartial trimming approach for joint dimension and sample reduction