cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FW94
Helper I
Helper I

Data Format Error

Hello,

 

My dataset in the query editor shows no errors however when I close and apply my changes there is one error. There is no option to view the error from the first dialogue box and so when I go back into the query editor and select "keep errors" I am greeted with the following:

 

DataFormat.Error: We couldn't convert to Number.
Details:
R-P51

 

I have one column which is in number format and have checked both Power BI and the original dataset for "R-P51" however there is no cell containing this. Power BI is also not directing me to the actual cell which is causing the error.

 

I have checked other questions people have posted however nothing has helped me with this. Would anyone have any ideas please?

 

Thanks

1 ACCEPTED SOLUTION

@parry2k I've managed to solve now. It looks as though an error was created during earlier stages where I split a column, changed their formats and carried out some data cleansing, and re-merged them, changing their format a final time. Once these steps had been removed, the changes were applied without problem. 

Thank you for your time and effort in helping

View solution in original post

10 REPLIES 10
Ailsa-msft
Community Support
Community Support

Hi @FW94 

I am glad to hear that you have solved this problem. Could you mark your own answer so that you can help other people with the same problem find a better solution .

 

Best Regards

Community Support Team _ Ailsa Tao

parry2k
Super User
Super User

@FW94 great to hear. that's why I asked for the M code, I wanted to check if there is something happening in the earlier steps. Well, good to hear it is all solved now. 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





parry2k
Super User
Super User

@FW94 click advanced editor and paste the full code.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





@parry2k I've managed to solve now. It looks as though an error was created during earlier stages where I split a column, changed their formats and carried out some data cleansing, and re-merged them, changing their format a final time. Once these steps had been removed, the changes were applied without problem. 

Thank you for your time and effort in helping

parry2k
Super User
Super User

@FW94 interesting, can you change the type of this column to text for the testing purpose and see if it loads correctly. Can you share M code here?






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





@parry2kI have ran the test as suggested and when I change this to text and "apply" I am greeted with the same error message as in my original post.

 

The M Code when selecting "keep errors" is as follows:

= Table.SelectRowsWithErrors(#"Filtered Rows3")

 

Apologies if this wasn't the M Code you were after if. If not, let me know which you are referring to and I will post.

parry2k
Super User
Super User

@FW94 so basically there is a column that is converted to a number with the text value. if you have multiple columns that are getting converted to number, change their type to text and change type of one column to number at a time to see which column is giving the error.

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





@parry2k I only have one column which is set as a number format and having checked this both in Power BI using the search filter, as well as the original data set in Excel, I can't find the error

HotChilli
Super User
Super User

Have you checked the option 'column profiling based on entire data set' (rather than first 1000 rows)?

@HotChilli just tried this (that's also a new feature to me so thank you as a side note for the introduction) and I receive the following error message:

"We encountered an error while computing the distribution"

For clarity, it works fine on the first 1,000 rows. The above message only appears when I change this to the whole dataset

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors