The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a column with text and numeric inputs. I want to add another column which returns the first letter if it starts with a letter or to return null (or 0) when it does not start with a letter. For example:
Column | Desired Column |
A6T4 | A |
4500 | null |
How can I achieve this?
Solved! Go to Solution.
@Anonymous , Sorry, Try like
Text.Select(Text.Start([Column],1), {"A".."Z"})
or
Text.Select(Text.Start([Column],1), {"A".."Z", "a".."z"})
@Anonymous , In power query a new column
if Value.Is(Text.Start([Column],1) , Int64.Type) or Value.Is(Text.Start([Column],1) , type number) then Text.Start([Column],1) else null