OPENROWSET T-SQL and MOLAP provider fail on complex DAX statements
Running the OpenRowSet (SQL2016) against a SSAS 2017 on-premise or Azure SSAS will fail with error
OLE DB provider "MSOLAP" for linked server "(null)" returned message "OLE DB error: OLE DB or ODBC error: An unexpected exception occurred.."
FROM OpenRowset('MSOLAP','DATASOURCE=<Servername>;Initial Catalog=<cube>;User ID=<userid>;Password=<password>’,
Running the DAX directly against SSAS (2017) returns the correct results, also the OpenRowSet command works fine in SSAS 2016 using the same DAX statement.
Bug maybe due to the properties differences in the OpenRowSet implementation rather than the MOLAP provider (these are the XML properties included in the MDX query to the server viewable in a Profiler trace )