Forum Discussion
Audi_B
10 years agoFrequent Visitor
Using Substring to modify column data....Is it possible in Power BI?
Hello all, I have one column in a list showing all accounts with a prefix on all account numbers of "00000". So each of these account numbers show like this: "00000123456789". I know in typical S...
- 10 years ago
Sean's solution will work for M code.
In DAX, you could create a new column with the following formula:
If all account numbers are the same length:
AcctNum = RIGHT([Account Number],9)
If not:
AcctNum = MID([Account Number,6,LEN([Account Number]) - 5)
You may have to adjust start number and how many characters you are removing from what LEN returns, but general gist is there.