Convert already added custom field to Accounting Dimension

Its been at least a year since I started using ERPNext, at that time I didn’t understand accounting dimension and I created a custom doctype “Container Number” and added link fields in sales invoice and journal entry MANUALLY instead of creating “Accounting Dimension”.

I need P&L Statement based on “Container Number” field, but If I create accounting dimension it doesn’t show any data in P&L Statement based on selected value in “Container Number” .

I even tried to delete the custom field and then add accounting dimension but it doesn’t work for current entries and also for future entries (like sales invoice).

Any help?