Forum Discussion
Seth4040
1 year agoRegular Visitor
Trim data
I have data that I need trimmed either a DAX or under Transform Data in the desktop. I have a account number that need to be 56702737-2 (Example) and some of these have data before the account numbe...
- 1 year ago
Hi Seth4040 ,
Thank you for reaching out to Microsoft Fabric Community.
In Power BI, open the Power Query Editor, select your table, and add a new custom column using the formula below. Also attached the pbix file for reference.
=Text.Middle(Text.Select(Text.Range([Vendor Invoice], Text.PositionOfAny([Vendor Invoice], {"0".."9"})), {"0".."9", "-"}), 0, 11)
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you!!
BhavinVyas3003
1 year agoSuper User
Click on custom column and apply the M Query as per your requirement.