Forum Discussion
alwright
2 years agoNew Member
If left starts with this, return this
Very new to Power BI and Power Query. I have a column A with values that look like this: (0102) and (0506), etc. I want a column B labled "Region" where, if column A starts with "(01" then column B spits out "Region 1". If column A is "(05", then column B is "Region 5". How would I do that?
Thank you.
Hi, I try to explain as simple as possible:
A.) Extract fisrt 2 characters
Enter 2
B.)
4 Replies
- Vijay_A_Verma
Most Valuable Professional
Put following formula in a custom column
[a = Text.ToList([Column A]), b = if a{0} = "(" and a{1} = "0" and Value.FromText(a{2}) is number then "Region " & a{2} else null] [b] - dufoq3
Community Champion
Hi, I try to explain as simple as possible:
A.) Extract fisrt 2 characters
Enter 2
B.)