Pivots of any kind are a hint that you should have used a database from the start.
While importing into SQL Server you should normalize your data model (each field should depend on the key, the whole key and nothing but the key) then add appropriate indexing.
Probably true, but we're an accountancy firm with shit IT support who don't do these big jobs often enough to justify training or a member of staff to deal with that side.
Pivots of any kind are a hint that you should have used a database from the start.
While importing into SQL Server you should normalize your data model (each field should depend on the key, the whole key and nothing but the key) then add appropriate indexing.
If you use SQL Server 2016, that has R built-in.