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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Sbegnaud
New Member

Power Query Deletes Customers With Letters

I have four customer numbers that I want to group together.  The numbers can contain letters.  Power BI deletes the customers that contain the letters and I can only see sales for customers with numbers.  How can I combine these?  I have tried turning my data into text but that isn't helping.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sbegnaud,

Thank you for reaching out in Microsoft Community Forum.

Please follow below steps to Keep Customer Numbers with Letters in Power BI;

1.In Power Query Editor, select the customer number column and change its data type to Text.

2.Remove any hidden spaces or special characters by trimming or replacing them (e.g., use Text.Trim).

3.Ensure the customer number column in your source system (Excel, database, etc.) is formatted as text, not numeric.

4.After applying these changes, refresh your Power BI data load.

Please continue using Microsoft Community Forum.

If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.

Regards,
Pavan.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Sbegnaud,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept  as  Solution" and give a 'Kudos' so other members can easily find it.

Thank you,
Pavan.

Anonymous
Not applicable

Hi @Sbegnaud,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept  as  Solution" and give a 'Kudos' so other members can easily find it.

Thank you,
Pavan.

I ended up grouping them together before I brought into Power BI.

Anonymous
Not applicable

Hi @Sbegnaud,

Thank you for reaching out in Microsoft Community Forum.

Please follow below steps to Keep Customer Numbers with Letters in Power BI;

1.In Power Query Editor, select the customer number column and change its data type to Text.

2.Remove any hidden spaces or special characters by trimming or replacing them (e.g., use Text.Trim).

3.Ensure the customer number column in your source system (Excel, database, etc.) is formatted as text, not numeric.

4.After applying these changes, refresh your Power BI data load.

Please continue using Microsoft Community Forum.

If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.

Regards,
Pavan.

Anonymous
Not applicable

Hi @Sbegnaud,

Thank you for reaching out in Microsoft Community Forum.

Thank you @BhavinVyas3003    for the helpful response.

As suggested by BhavinVyas3003,  I hope this information was helpful. Please let me know if you have any further questions or you'd like to discuss this further. If this answers your question, please "Accept as Solution" and give it a 'Kudos' so others can find it easily.

Please continue using Microsoft community forum.

Regards,
Pavan.

BhavinVyas3003
Super User
Super User

If you've already converted the column to text and Power BI is still deleting customers with letters, try the following steps:

  1. Check for Errors: In Power Query, ensure there are no errors in the column by selecting "Transform" > "Detect Data Type" again.
  2. Remove Special Characters: Sometimes, special characters or hidden spaces might cause issues. You can use the "Transform" > "Replace Values" option to remove any non-numeric characters or unwanted spaces.
  3. Use Custom Column: Create a new column to explicitly handle the grouping. Use a formula like Text.Trim([CustomerNumber]) or Text.Select([CustomerNumber], {"0".."9","A".."Z"}) to clean up and standardize the values.
  4. Group by Customer ID: After these adjustments, try grouping the data again, ensuring you select the newly formatted column.

Thanks,
Bhavin
Problem solved? Hit “Accept as Solution” and high-five me with a Kudos! Others will thank you later!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.