Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 original number.
I need this in text as I want to append this with another text. Adding an @ mention as I saw a solution in another post but that is to a different issue.
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.
Hi,
this is what you get by adding a custom column
= Table.AddColumn(Source, "Custom.1", each if Text.Length([Column1]) <= 15 then [Column1] else Text.Start([Column1],15)& Text.Repeat("0",Text.Length([Column1])-15))
If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
13 | |
12 | |
12 | |
12 |