MDX Query works in cube browser not in powerpivot due to error, "Unable to cast object of type 'System.DBNull' to type 'System.String'."

  • As you can see from the topic, I was using a fairly complex query in the CubeBrowser and it was working greatly. I then proceeded to paste this into powerpivot and it replied with the error. :

    Unable to cast object of type 'System.DBNull' to type 'System.String'.

    Initially, I thought it was due to the complexity of the query. Now I have determined that it is more than that, because now when I put in the simplest of queries I still receive the above error.

    Has anyone run into this error before when pasting into powerpivot? I cannot click the checkbox "Import measures as text", but it does not really help me other than allow me to import the data because I then need to go through and define all my datatypes manually.

    Any advice/direction on troubleshooting this error is greatly appreciated.

    Thanks.

  • I just ran into this today. Saw a post from "UserSmith" on http://social.msdn.microsoft.com/Forums/en-US/sqlanalysisservices/thread/64fbddf0-8990-482b-add5-28a2e677c109. While this "UserSmith" claims the answer is somewhere in the post at http://sqlblog.com/blogs/mosha/archive/2005/06/30/how-to-check-if-cell-is-empty-in-mdx.aspx, unfortunately, that response didn't help me a teensy bit... I was doing the null checks as prescribed by Mosha. Sure wish that "UserSmith" had been specific about what code was changed and why...

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply