Forum Discussion
Trim data
- 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!!
Hi Seth4040 ,
Can you provide more data? to make tests here.
Please consider to not share sensitive data.
Thank you!
| Vendor Invoice | Status | Custom |
| FQ 53362278-10 | PAID | |
| CHATM 53253786-10 | PAID | |
| WIL 52913084-10 | PAID | |
| 53954321-10 SANFD | PAID | 53954321-10 |
| 54388077-10 WIL F | PAID | 54388077-10 |
| 55345830-10 | PAID | 55345830-10 |
- v-sathmakuri1 year agoCommunity Support
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!!