Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hiya,
I would like to add a new column in PBI and only remove the last character if i is letter. Could you please help? Thanks
Original Column | New Column |
1234A | 1234 |
4321B | 4321 |
6789D | 6789 |
12345 | 12345 |
Solved! Go to Solution.
Try the following:
New Column =
var ColumnLen = LEN('Table'[Column])
var lastCharacter = RIGHT('Table'[Column])
return IF(ISERROR(INT(lastCharacter)), LEFT('Table'[Column], columnLen - 1), 'Table'[Column])
Thanks it works perfectly 🙂
Try the following:
New Column =
var ColumnLen = LEN('Table'[Column])
var lastCharacter = RIGHT('Table'[Column])
return IF(ISERROR(INT(lastCharacter)), LEFT('Table'[Column], columnLen - 1), 'Table'[Column])