cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
grahamotter Frequent Visitor
Frequent Visitor

We cannot convert the value 0 to type Text.. Refreshes in Desktop but not in service

Hi folks,

 

I'm having real difficulty finding an answer for this one and I can usually find an answer, or something close enough for me to devise something from the web, somewhere

 

I have a Power BI report which is connected to an SQL database. The report refreshes fine in the desktop version but will not refresh in the web service. I get the following error message:

Data source error:We cannot convert the value 0 to type Text.. The exception was raised by the IDbCommand interface. Table: Orders Count.

 

I have searched for days and can't find anything which actually helps me solve this issue. It would be so much easier if Power BI error message actually mentioned which field the issue lies in but sadly not. Something which came close to my query is here 

We-cannot-convert-the-value-null-to-type-Logical-in-Service/ 

 

Something I did notice is that there is a double dot after the word Text in the error message. I'm not sure if this is a red herring though as I've searched for this along my 2 days of trying to fix this issue but did not find a value of '..' the the table Orders Count

 

Thanks in advance for any help you can offer

4 REPLIES 4
Community Support Team
Community Support Team

Re: We cannot convert the value 0 to type Text.. Refreshes in Desktop but not in service

hi, @grahamotter 

Try to remove the [] directly in the M code as below:

Before:

DataLake.Contents("adl://adlstest01.azuredatalakestore.net/data/examples/entries.csv", [])

After:

DataLake.Contents("adl://adlstest01.azuredatalakestore.net/data/examples/entries.csv")

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
grahamotter Frequent Visitor
Frequent Visitor

Re: We cannot convert the value 0 to type Text.. Refreshes in Desktop but not in service

Hi there,

 

Thanks for the reply but there's no [] in any of the code.

 

The table which is causing an issue, according to the web service, is a copy of another table (the main table). Neither of these have a [] listed anywhere in the code

 

My data is coming directly from a view I created in Azure SQL

grahamotter Frequent Visitor
Frequent Visitor

Re: We cannot convert the value 0 to type Text.. Refreshes in Desktop but not in service

Still struggling with this as the error message isn't very helpful.

 

I'm getting to the point of attempting to rebuild the report but this will take a 2 to 3 days to do so I'm reluctant to go down this route in a hope this may fix it

 

Any more suggestions would be gratefully received

grahamotter Frequent Visitor
Frequent Visitor

Re: We cannot convert the value 0 to type Text.. Refreshes in Desktop but not in service

Can anyone offer any more help with this?

 

I've spent 2 days rebuilding the report after stripping the table which was causing the error of the code and adding back one line at a time. After adding each line I re-published and manually refreshed in the web service to test whether it was that line which was causing the issue. I thought I had found the issue and so changed the code to a different approach to achieve the same thing and then re-published and refreshed in the web service. This seemed to work, i.e. the manual refresh didn't fail with the error message i was getting.

 

I then continued to spend 2 days completely rebuilding the report only to find when I re-published and refreshed in the web service I was back to square one with the same error message (just now 2 extra days spent on this)

 

Is there a way to raise a support ticket with microsoft who can help me better understand this error message and be able to come to a solution soon?

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Top Kudoed Authors
Users Online
Currently online: 383 members 4,097 guests
Please welcome our newest community members: