Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Error Convertir texto en número

Hola

Traté de convertir una columna, que se ha exportado automáticamente como texto, a número decimal, pero me puse por debajo del error. ¿Sabes cómo puedo arreglar esto?

1.JPG2.JPG3.JPG

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@ehsanbh , compruebe si hay espacio.

Cree una nueva columna con Text.Trim y conviértala en decimal y compruebe si funciona. Significa que es un problema tener espacio en blanco.

si es necesario, consulte cómo manejar el error en la consulta de energía
https://www.youtube.com/watch?v=OE6DPmKqN7s
https://www.youtube.com/watch?v=9-Lag0VOiTs

View solution in original post

@ehsanbh De nada. Me alegro de que haya funcionado.

PS, se puede marcar más de una respuesta como una solución, ya que Amit y yo respondimos alrededor de la misma idea con sugerencias similares - grandes mentes piensan igual. 🙂

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

8 REPLIES 8
Syndicate_Admin
Administrator
Administrator

Leí la solución pero todavía no puedo resolver este problema. Mi número es como este 123,456 y cuando cambio el tipo de datos en power query, las columnas completas muestran errores. ¿Qué tengo que hacer? Gracias

Reemplace la "," por nada y redefina el tipo de variable 

Muchas gracias. Funciona ahora, pero solo para una columna, tengo el problema de que todos mis datos numéricos siempre tienen automáticamente una coma entre los números. ¿Conoces algún escenario para deshacerte de esto en el futuro?

amadrigalcr
New Member

Yo tuve el mismo error y lo sulucioné así:

1. Entrar a edición de consulta

2. Clic derecho sobre una celda de la columna y Reemplazar valores " " por nada

3. En Tipos de datos cambiar texto por número

 

I had the same problem and it is my solution:

1. Enter to the query

2. Right clic on a cell in the column, replace values " "  for nothing

3. Change tipe of variable for number

 

Its work

amitchandak
Super User
Super User

@ehsanbh , compruebe si hay espacio.

Cree una nueva columna con Text.Trim y conviértala en decimal y compruebe si funciona. Significa que es un problema tener espacio en blanco.

si es necesario, consulte cómo manejar el error en la consulta de energía
https://www.youtube.com/watch?v=OE6DPmKqN7s
https://www.youtube.com/watch?v=9-Lag0VOiTs

AllisonKennedy
Super User
Super User

Supongo que hay un espacio después del número o un formato oculto como código html que está impidiendo que sea un número puro. Intente hacer una limpieza y recorte, luego cambie el tipo de datos a número.

¿Cuál es la fuente de datos?

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

@AllisonKennedy Trim worked perfectly! Thanks a lot. These are electricity data I am reading from a CSV file.  

@ehsanbh De nada. Me alegro de que haya funcionado.

PS, se puede marcar más de una respuesta como una solución, ya que Amit y yo respondimos alrededor de la misma idea con sugerencias similares - grandes mentes piensan igual. 🙂

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors