I was wandering, if there was a way to reverse engineer an SSAS OLAP cube back into its original relational representation. Is such a thing possible?
I was able to set up a linked server on my Sql Server and then use an OpenQuery to get data out. It is a little bit ugly, but you can do it like below:
SELECT "[Dimension Name].[Hierarchy Name].[Department Name].[MEMBER_CAPTION]" as Department,
round("[Measures].[Some Calculation]",3) as Value,
'Value_Descr' as Value_Descr
FROM OPENQUERY(SSAS_Link,' SELECT NON EMPTY { [Measures].[Some Calculation] } ON COLUMNS
,NON EMPTY {([Date Dimension].[Hierarchy].[Fiscal Year Code].ALLMEMBERS * [Dimension Name].[Hierarchy Name].[Lowest Hierarchy Level Field].ALLMEMBERS) } DIMENSION PROPERTIES MEMBER_CAPTION
,MEMBER_UNIQUE_NAME ON ROWS FROM (
SELECT ({ [Dimension Name].[Field to Filter].& [Key of Field to filer] }) ON COLUMNS
FROM (SELECT ([Fiscal Week Code - Last Week]) ON COLUMNS FROM [Cube Name]) )
WHERE ([Dimension Name].[Field to Filter].& [Key of Field to filer]) ')