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
PetrK
Helper II
Helper II

Wrong result of Convert String to Int

Hi, I have table Units with column UnitId1 which contain numbers in format string, I created calculated column UnitId with function

 
UnitId = CONVERT(Units[UnitId1], INTEGER)

 

but it return 1 for all rows. See picture. What is wrong?

 

PetrK_0-1668184715535.png

Thank you for help

1 ACCEPTED SOLUTION
djurecicK2
Super User
Super User

Hi @PetrK ,

 

Hi PetrK,

 Is it possible that the matrix is showing a count of UnitID or other aggregation of the column? What does data view show?

View solution in original post

3 REPLIES 3
mangaus1111
Solution Sage
Solution Sage

Hi @PetrK ,

why don´t you change the data type in power query? It is much easier in my opinion.

mangaus1111_0-1668185579546.png

 

 

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

Data source is Direct Query, so it is not possible to use Power Query. I have found cause. In visual table column UnitId was set on "Count". After change to "Don't summarize" it is OK

 

 

 
 

 

 

djurecicK2
Super User
Super User

Hi @PetrK ,

 

Hi PetrK,

 Is it possible that the matrix is showing a count of UnitID or other aggregation of the column? What does data view show?

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.