Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello
Want to get a text string without spaces.
Is connected to a "SQL Server Analysis Services Database" in Power BI sometimes the information is with spaces and sometimes without.
As an example 'Item'[Type] can be:
09 000 5227
09 000 5228
090005229
The example I have found is to create add new column but since I am connected to a database I do not have access to add a new column.
Solved! Go to Solution.
You can use replace method to replace a space with nothing if you are using Import mode with AS.
If you are using live connection mode with AS, there is no way to do so. You must try find a way to remove the space in AS before connecting to Power BI. Because live connection mode retrieves the entire AS model, you cannot access query editor to change the content, also dax is used to create new fields not to change existing column with dax. Hope that is clear.
Best Regards
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
You can use replace method to replace a space with nothing if you are using Import mode with AS.
If you are using live connection mode with AS, there is no way to do so. You must try find a way to remove the space in AS before connecting to Power BI. Because live connection mode retrieves the entire AS model, you cannot access query editor to change the content, also dax is used to create new fields not to change existing column with dax. Hope that is clear.
Best Regards
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Hi @Anton-G ,
You can create a measure with code:-
Measure =
SUBSTITUTE ( MAX ( 'Table'[column1] ), " ", "" )
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@Anton-G Right-click the column in Power Query Editor. Choose Replace values. Replace space with nothing.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
27 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |