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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AHM
Helper I
Helper I

Error "Cannot convert value 'xxxx' of type Text to type Integer while processing column"

Hi to all

 

I´m new in Power Bi and I´m sure this is a very easy question.

 

I create the relations using the field clienCode that has numbers and numbers + text. Example: clienCode = 1000000 andclienCode COD.091

 

  • On the image #1 an error when I´m trying to add to a table visualization a field from a table that are linked in between them.
  • On the image #2 the format of the column, I also have tried changing all columns to text and to "123 / text" with no results
  • On image 3 the links between tables

 

Image 1 an error when I´m trying to add to a table visualization a field from a table that are linked in between them.

 

Captura de Pantalla 2020-03-10 a la(s) 2.52.29 p. m..png

 

Image 2the format of the column, I also have tried changing all columns to text and to "123 / text" with no results

Captura de Pantalla 2020-03-10 a la(s) 2.49.01 p. m..png

 

Image 3 the links between tables

Captura de Pantalla 2020-03-10 a la(s) 2.46.56 p. m..png

 

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @AHM 

 

Thank you for providing files. You may try to do as follows. 

 

You need to go to 'Query Editor'. You may make the query and 'Changed Type' step selected and then change the date type of 'ClientCod' and 'Zip'.

a1.png

a2.png

a3.png

 

Result:

a4.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

8 REPLIES 8
v-alq-msft
Community Support
Community Support

Hi, @AHM 

 

DAX automatically converts strings into numbers and numbers into strings whenever required by the operator. For example, if you use the & operator, which is used to concatenate strings, DAX converts its arguments into strings. You may take a look at the following formula:

= 8 & 2

 

It returns “82” as a string. However, the following formula returns an integer result with the value of 10.

"8" + "2"

 

I'd like to suggest avoiding automatic conversions. If some kind of conversion needs to happen, then it is much better to understand the calculation if you take control over it and make the conversion explicit. In order to be more explicit, the previousexample can be:

= VALUE ( "8" ) + VALUE ( "2" )

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Alan hi

 

In the column code which is the column with which I made the table conextions have lines / enteries with just numbers ex: 100000 and with tex + numbers ex: Cod.091 as you can see in image 2.

 

When I tried to create a table in the visualizations segment I got the error in image 1.

 

I change manually the format from all the columns to text and also tryed leaving the format as Power Bi sugested with no results.  By your mail I understand that I need to use dax to convert the entries but the question is: as I have text and numbers to which format and with which formula should i do that?

 

Image 1 Error

Captura de Pantalla 2020-03-10 a la(s) 2.52.29 p. m..png

 

Image 2: Tipes / format entries:

 

Captura de Pantalla 2020-03-11 a la(s) 10.27.53 a. m..png

 

v-alq-msft
Community Support
Community Support

Hi, @AHM 

 

I wonder what data type the fields used for join two tables are. For further information, please show me some fake data and expected result. Do mask sensitive data before uploading. Thanks.

 

Best Regards

Allan

 

Allan @v-alq-msft , hi

 

Do you have a mail where I can send you the examples? Unfortuantelly I was not able to upload the files in the replay or as a new private mesage

 

Regards

 

 

 

v-alq-msft
Community Support
Community Support

Hi, @AHM 

 

You may send me a onedrive link with the private messages in Community. Do mask sensitive data before uploading. Thanks.

 

Best Regards

Allan

 

Allan @v-alq-msft hi

 

I cant send you the info becaus according to the community I have no more mails to send (Image 1) but it also tell my that I have not send any private mesages...

 

Can you send me a private mail with some adress or a link to a OneDrive folder so I can send you the file

 

Captura de Pantalla 2020-03-13 a la(s) 6.18.51 p. m..png

 

Captura de Pantalla 2020-03-13 a la(s) 6.20.09 p. m..png

 

 

v-alq-msft
Community Support
Community Support

Hi, @AHM 

 

Thank you for providing files. You may try to do as follows. 

 

You need to go to 'Query Editor'. You may make the query and 'Changed Type' step selected and then change the date type of 'ClientCod' and 'Zip'.

a1.png

a2.png

a3.png

 

Result:

a4.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

It worked perfectly!!!

 

Thank you very much

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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