Forum Discussion
Two tables with same data but different formatting. Power Query or Power Pivot?
cpartridge You need to UNpivot the second table. The site in the link below would be a good place to start learning about PQ.
https://exceloffthegrid.com/power-query-introduction/
Work your way through the first page. Almost at the end you'll see this:
etc.
Post number 12 deals with unpivotting data in particular.
Once you master that you can turn the blue table into the green one. The only thing left is renaming the columns Attribute and Value.
I'm not really sure what you want to do next, but I guess you want to load both Table A and the "green one" to the DM, relate the Departments and then create your Pivot table. But, since neither of the two tables contains a column with unique departments you would have to create a so-called bridge table between them. A table that lists all existing (unique) department names. Based on your example that would be something like this: