The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Solved! Go to Solution.
This was exactly what I was looking for, thank you! And thank you for keeping it simple, I really appreciate it.
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]
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
34 | |
19 | |
18 | |
16 | |
13 |