3

I'm trying to execute a sql query through powerpivot and I get the following error

"Unable to convert a value to the data type requested for table (massive hex string) column (name)"

SELECT [name], [table].[group],[table2].[group2] ,SUM([number]) AS number
FROM table LEFT JOIN [table2] ON table.[group ID]  = [table2].id 
GROUP BY [name],[table].[group],[table2].[group2]

Powerpivot's validator is happy with the query and the same query runs fine through sql management studio, any ideas how I can fix this?

1
  • Is the cell in EXCEL assigned a datatype already, like Number? Commented Aug 8, 2011 at 13:15

2 Answers 2

3

this usually happens when you are updating a query in a table that already had data from the original query, and the columns in that table already assigned datatypes based on the previous query. Either recreate the table or change the datatypes to the ones in your new query.

Hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

1

I had same issue. I am querying a Powerpivot book on sharepoint and some of the values coming back were blank or "NaN xxx." This is because I made an Iferror( ,BLANK()) in the measurements.

I changed the calcualted measure from IFERROR( ,Blank()) to IFERROR( ,0) and then I could successfully query the model on sharepoint.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.