Search code examples
sql-serverolapbidsolap-cube

Changing datatype of field in OLAP Cube


I'm working on OLAP Cube on SQL-Server 2008 and I have to add one field to existing OLAP Cube. I got a problem, because field in source database is of type Integer, and in the cube it have to be Date. It has format MMYYYY. DataType in properties of this field is grayed out so I cannot edit it. Is there any way to change it's type to Date?
I have never worked with OLAP.


Solution

  • In the Data Source View in your SSAS project, add a computed column that uses SQL to derive a Date column from the value of the int column.

    Then in your cube, reference the computed column in your Data Source View instead of the original column.