Forum Discussion
How to remove one semicolumn using DAX coding?
- 1 year ago
Thank you for the emessage!
I have manually modified the source file using programming Editor.
Hi toplisek,
Thank you for reaching out to the Microsoft fabric community forum. Also thanks speedramps for his insights on this thread. I have identified several alternative workarounds that may assist in resolving the thread.
Based on your description, it sounds like the extra semicolons in your files are introducing unexpected blank columns when importing into Power BI, particularly from CSV or Excel formats. This can lead to parsing errors or data misalignment during the import process.
Since DAX operates after the data has already been loaded into the model, Dax is not the right tool to clean raw CSV data it operates after the data is loaded into Power BI. To fix this, Power Query (M code) is the appropriate layer, not DAX.
If you're working with Excel files, you can use the Excel.Workbook function in Power Query to access the sheet contents and then remove any extra columns caused by formatting inconsistencies. Here's the official Microsoft documentation for reference: Excel.Workbook – Power Query M
Use Text.Replace or Text.TrimEnd inside Power Query to clean unwanted semicolons from columns. Or use Table.RemoveColumns if an extra column is being created due to the trailing semicolon. Also please go through the below mentioned links for better understanding:
Text.Replace - PowerQuery M | Microsoft Learn
Text.TrimEnd - PowerQuery M | Microsoft Learn
Table.RemoveColumns - PowerQuery M | Microsoft Learn
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
- v-kpoloju-msft1 year agoCommunity Support
Hi toplisek,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- v-kpoloju-msft1 year agoCommunity Support
Hi toplisek,
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 it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.