How to change stock setting to Moving Average from FIFO Method While Valuation entries exists

I want to Change Valuation method in stock setting from FIFO to Moving Average but it showing error that ‘‘Can’t change the valuation method, as there are transactions against some items which do not have its own valuation method’’. how to overcome this because i didn’t want to use FIFO method anymore. does anyone has the solution let me know?