Forum Discussion
Error - DataFormat.Error: We couldn't convert to Number. Details J7510
- 9 years agoThank you! I made the changes to the excel file first then made them again in the Desktop and it seems to have worked.
Hello!
I have the same error when importing web data from: https://es.wikipedia.org/wiki/Copa_Am%C3%A9rica
Trying to convert the year that is a string data type to the integer data type.
This error is only displayed in some cases (rows).
I copied the column Year (Year), to Year-Copy (Year-Copy) and aplyed Whole Number Conversion.
As taught in the Microsoft Virtual Academy course: https://mva.microsoft.com/en-US/training-courses/initiating-with-power-bi-16911?l=Zj9Ql9MED_2305192797
Any advice please?
Hi, Try apply a Trim & Clean from Transform Menu before the change to whole number
Regards
Victor
Lima - Peru
- Franz_Valverde8 years agoFrequent Visitor
Hi Victor!
Thanks for you help!
I did it such you suggested it;
I trimmed and cleaned from format option in transform ribbon menu.
But I got de same result, transformation error:
DataFormat.Error:
We couldn't convert to Number. Details: 1916
Regards!
- MarcelBeug8 years agoCommunity Champion
Unfortunately you didn't mention which table from the website you are using, so I just picked one.
This works fine if you take the first 4 characters before converting to numbers.
let Source = Web.Page(Web.Contents("https://es.wikipedia.org/wiki/Copa_Am%C3%A9rica")), Data13 = Source{13}[Data], #"Changed Type" = Table.TransformColumnTypes(Data13,{{"Jugador", type text}, {"Selección", type text}, {"Año", type text}}), #"Duplicated Column" = Table.DuplicateColumn(#"Changed Type", "Año", "Año - Copy"), #"Extracted First Characters" = Table.TransformColumns(#"Duplicated Column", {{"Año - Copy", each Text.Start(_, 4), type text}}), #"Changed Type1" = Table.TransformColumnTypes(#"Extracted First Characters",{{"Año - Copy", Int64.Type}}) in #"Changed Type1"- Franz_Valverde8 years agoFrequent Visitor
Hi Marcel!
Thanks for your help!
Are not you able to see the image I posted?
It's Torneos Table!
I made a video in order to be clear enough.
Please see it at https://www.youtube.com/watch?v=REdTfgQMNoY
Thanks in advance!
Franz