Forum Discussion
OLE DB or ODBC error: type mismatch (exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
It worked thank you very much!
Too bad I had to copy all my old measures again and change the origin of the dependant queries, but it helped a lot :)
A date field was giving me probs, it loaded from SQL as text, so I changed it to Decimal number and then then tried to create a Date field, But I still got that message, so I left it as a Decimal number and created four seperate columns, Year, Month, Day and then concateated them together and the query reloads without the error. Hope that helps someone.
- Syndicate_Admin4 years agoAdministrator
I had a similar fix as KH11NDR. I also was using SQL as my data source and pasting in my SQL in the advanced editor to add fields. I thought I would save time reformatting in PBI by formatting currency in my SQL and also formatting dates mm/dd/yyyy in SQL using just format without convert (ie. convert(date, format(Data_field, 'd', 'en-us')); however, this caused PBI on load to mis-categorize the fields as text instead of currency or date. To fix the error, I had to remove the formatting in SQL and reformat these fields in PBI after loading. Hopefully this info helps others who might run across similar instance.