An interesting thing happened to me today. I added a field to a fact table that I had. As normal, I did the change in my data source view as procedure dictates, and create the new measure on my cube. Everything looked fine and dandy until I tried to deploy the cube. Right off the bat, this error came up: “OLE DB error: OLE DB or ODBC error: Invalid column name ‘<ColumnName>’.; 42S22″. Huh? What happened? I double checked the DSV and the cube (thou not entirely as we’ll see further down) and everything looked ok. Re-deploy, re-discover same error.
A Google browse and an hour later, I read on www.sqlservercentral.com forums that it could be the partitions. And then the proverbial lightbulb turned on in my head. I forgot to recheck the partitions, to include the field in the select statements for the fact table. Lesson learned? If you use partitions, always check them when you add a field to your fact table.