A question in Mr. Excel-Forum about how to design your data model if you want to compare values from 10 different (fact-) tables with each other got me curious: As this simply felt so wrong… and where there are 10 tables today, there will be probably be 12 tables next …?
Time for Power Query to play out its strengths on dynamic approaches then: Key is to create one consolidated table from all the different input-tables with an additional column that contains the name of each source table.
If your data sits in Excel tables, you can find the description on how this works in the new Power Query book from Ken Puls and Miguel Escobar, starting on page 47 (key is to keep the name-column!).
In my example I’m using web-data that already has the format of a consolidated table, comparing inflations rates of different countries with each other. So the data-structure looks like this:

You then start a new query that refers to your source data and merge it with the source again on the year-column. The year-column shall stay the same, as we don’t want to compare different years against each other, but only different countries (Sources).
This will actually create a crossjoin of all countries against the country in the respective row – but within the same year. Last step is to create an additional column that calculates the difference between the values. This tells you how the inflation rate of the country to compare against is in relation to the source-country:

& this is the code:
Read more