Forum Discussion
bhushan_7
3 years agoNew Member
All characters after 15 characters getting converted into zeros after changing data type to text
Hi, I have numbers in excel (data source). Numbers are of various lengths. In all numbers where characters are more than 15, automatically zeroes appear, replacing any characters present in the o...
ronrsnfld
3 years agoSuper User
The values in Excel are text strings.
PQ will automatically detect those text strings as numbers, and reduce them to a maximum of 15 digits precision.
If you want to maintain them as the original values that you see in Excel, you need to prevent that conversion from happening in PQ.
In PQ, open the Advanced Editor (on the Home tab)
you will see a line near the top of the code that starts with:
#"Changed Type" = Table.TransformColumnTypes(Source, {{"ColumnName", type number},{"Another ColumnName", Int64.Type},.....
For the entry where "ColumnName" is the name of the column where your data exists, merely change type number or Int64.Type to type text. And, unlike Excel, the case (capitalization) IS important.