Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi,
Im trying to create a column with left function with certain number of letters/numbers depends on text string.
Data:
1111-1
2222-2
AAAA11
BBBB1122
The result im looking for:
1111
2222
AAAA11
BBBB11
So I only want 4 letters/numbers when there is symbol "-" and only maximum 6 letters/numbers,
How do I set this up?
Solved! Go to Solution.
Hello,
You can try something like this:
LEFT(Column, MIN(IFERROR(SEARCH("-",Column),LEN(Column)+1)-1, 6))
Hello,
You can try something like this:
LEFT(Column, MIN(IFERROR(SEARCH("-",Column),LEN(Column)+1)-1, 6))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
126 | |
113 | |
74 | |
65 | |
46 |