Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi guys,
I've had issue in the past where Project Online data pulls in with 'non printable characters'. It's a pain because it appears as a space but when you try to (for example) merge the table with another table, they won't match. To overcome this, I wanted to perform a find and replace on the table data in Query Editor when it is imported to replace the non-printable character with " " (a space).
The issue I am concerned about is what happens if a column is added or removed from the table that is being imported. This happened only yesterday causing the query to fail because the column couldn't be found.
Hoping someone could tell me:
Thanks
KC
Solved! Go to Solution.
You can do this by using the Table.ColumnNames function in replacement of the specific column list. E.G. Table.ReplaceValue(#"Last Step",null,"-",Replacer.ReplaceValue,Table.ColumnNames(#"Last Step"))
The way to replace value in whole table: First select all columns and then use 'Replace value' feature. If it is not your case,could you show us the steps about your issue? I cannot reproduce your scenario.
Regards,
Cherie
I'm afraid there's no better way to achive that. I would suggest you modify or add steps in query editor to replace the values in whole table.
Regars,
Cherie
Maybe you should avoid saying 'there is NO better way to achieve this' unless you are absolutely sure. Clearly, looking at the solution, there is a better way, and exactly what was asked for (using Table.Columns with the name of the previous step). Luckily I didn't just read your answer and give up...I am only saying this as it says you are an 'employee' of Microsoft, so people will take what you say seriously, and in this case it is seriously wrong, despite your assurances...no offence meant, but try not to be so adamant, unless you are absolutely sure.
You can do this by using the Table.ColumnNames function in replacement of the specific column list. E.G. Table.ReplaceValue(#"Last Step",null,"-",Replacer.ReplaceValue,Table.ColumnNames(#"Last Step"))
this was EXACTLY what i needed - thank you so much
This is great!
Is it possible to only apply this to columns of type text? I have date and currency columns I would need to bypass.
You should be able to use the Table.ColumnsOfType function in place of the Table.Column to limit the list returned to only columns of a specific type.
Champion! Thanks.
Excellent re whole table thanks!
This solution works and resolves replacing values in columns that can have changing names.
It seems you may have a look at below two articles to check if they could help you.
https://blog.crossjoin.co.uk/2014/09/18/handling-data-source-errors-in-power-query/
https://blog.crossjoin.co.uk/2015/02/26/handling-added-or-missing-columns-in-power-query/
Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.
Regards,
Cherie
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
95 | |
86 | |
78 | |
66 |
User | Count |
---|---|
150 | |
118 | |
111 | |
106 | |
95 |