Forum Discussion
Remove trailing 2 characters from end string
- 7 years ago
Hi Anonymous ,
Based on my test, you could refer to below steps:
In power query:
Add a custom column and enter below code:
Text.Start([Data],Text.Length([Data])-2)
Result:
In dax, you could refer to below formula:
Column = LEFT('Table1 (2)'[Data],LEN('Table1 (2)'[Data])-2)Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Anonymous
This request looks like it may solve your issue if you haven't got it already.
Scott
Thanks Scott. I actually had tried that. But what it is doing is either removing 1 or 2 characters. Take a look at the outcome when I try to split the columns. The left is the before, the right is the after. ;
- v-danhe-msft7 years agoMicrosoft Employee
Hi Anonymous ,
Based on my test, you could refer to below steps:
In power query:
Add a custom column and enter below code:
Text.Start([Data],Text.Length([Data])-2)
Result:
In dax, you could refer to below formula:
Column = LEFT('Table1 (2)'[Data],LEN('Table1 (2)'[Data])-2)Result:
You could also download the pbix file to have a view.
Regards,
Daniel He