Year-over-year reports break when a product, customer or account code is changed as if it had always had the new name. The current period looks complete, the prior period looks low or empty, and the comparison becomes an argument instead of a measurement. I would treat codes as identifiers with a history, keep a mapping when they change, and recalculate comparable periods with that mapping before I trust a percentage change.
This is a reporting-design guide. It is not a reason to avoid improving messy codes. It is a reason to change them in a way that preserves history. If totals are already too high because tables were joined at the wrong grain, fix that first with the Power BI grain and relationships guide.
Treat codes as identifiers with a history, not as labels you can overwrite
A product code, customer number or general-ledger account is used in invoices, inventory, sales history and often in contracts. If you overwrite the code on the master record and on every historical transaction, you may keep a single current name, but you will lose the ability to explain what the old reports were showing. If you overwrite only the master record and leave historical transactions on the old code, current and prior periods will no longer meet unless you map them.
Decide which of those two mistakes you are trying to avoid. In most small business systems, the safer pattern is to keep historical transactions as they were recorded, maintain a mapping from old code to new code, and use that mapping in reports that need a continuous series.
Renaming a display label, such as a product description, is usually less disruptive than changing the identifier. If a clearer name is all you need, change the description and leave the code alone.
Keep a mapping of old codes to new ones
When a code must change, record the old value, the new value, the effective date, and the reason. Include merges, such as two customer records becoming one, and splits, such as one product becoming two. A merge is not the same as a rename, and a year-over-year report will be wrong if you treat them as the same thing.
Store the mapping where reporting can use it, not only in an email or a warehouse notebook. If you are moving lists out of spreadsheets, give this mapping a proper table rather than another tab that will be forgotten.
Do not reuse an old code for a new and unrelated item. Reused codes make historical quantities and prices appear to belong to the new item. If the system requires recycling numbers, isolate those records and document them; do not hope nobody will notice.
Decide how discontinued items and renamed customers appear
Discontinued products still belong in a prior-year comparison if you are explaining a sales change. Hiding them makes the remaining items look stronger than the business was. A clear group such as “discontinued” or “replaced by” is better than dropping the history.
Customers raise the same issue when a company changes its legal name, is acquired, or was previously entered twice. The safe customer-merge process should record which identifier survives and how historical sales are attributed. A year-over-year report that uses only today’s surviving code, without the predecessor, will understate the prior period.
Write the display rule down: show the current name with a reference to the former code, or show both, but do it the same way in every comparable report.
Recalculate comparable periods with the same mapping
When you publish a year-over-year figure after a code change, both periods should use the same mapping. Apply the current commercial grouping to the prior period, or apply the old grouping to both, but do not compare an unmapped prior year with a remapped current year and call the difference growth.
Illustrative example: product A is replaced by product B in March, and customers are told to order B. A current-year report that includes only B will look weak against a prior year that included A, unless A and B are grouped as a continuing item. The opposite error is also possible: if A remains in the item list and B is added, a category total can rise because the same demand is now in two codes during the transition.
Test the mapping on a period you already trust, such as last year’s closed annual report. If you cannot reproduce the old official total when the mapping is turned off, or the intended comparable total when it is turned on, the mapping is not ready.
Label reports that are not comparable
Sometimes a comparable series cannot be constructed, because history was overwritten, because invoices were not coded, or because a new line of work has no predecessor. In that case, say so on the report. A missing comparison is more honest than a precise-looking percentage that depends on a broken join.
If you show both a comparable view and a raw as-recorded view, label them. People will otherwise pick the figure that supports the story they already want. The KPI dictionary should include this definition so a later dashboard does not quietly switch versions.
When a mid-year change is large, consider presenting the year in segments, before and after the change, in addition to a mapped full-year view. That extra cut often explains a surprise that a single percentage conceals.
Test a known prior period after every code change
After codes are changed in the source system, rerun the standard monthly or annual comparison and reconcile it to the previous official total. Include a sample of renamed, merged, split and discontinued items. If the report is used in purchasing or sales meetings, give those teams a short note about what changed in the labels they will see.
Build the test into the change process, not into a later emergency. A database consultant can help put the mapping and the comparable views into a stable schema, and data analytics consulting can help rebuild the reports that depend on them.
For help repairing year-over-year reports after product or customer code changes, Contact Us. Share the report definition, the list of code changes and a previously accepted period total, not a complete customer or product history with unnecessary personal data.