Forum Discussion
Power Query create a new column in power query based on inputs from 3 columns
i want to return a value based on the value on two columns and the first 5 characters of a 3rd column
| Column A | Column B | Column C | New Column |
| 1 | Ted | Red light | Yes |
| 2 | Ted | Red Dark | No |
| 1 | Ted | Red Dark | Yes |
eg i want a "Yes" in New column if A=1, B="Ted" and C starts with "Red"
thanks
Hi rafterse,
Add a New column with this code:
= if [Column A] = 1 and [Column B] = "Ted" and Text.Start([Column C], 3) = "Red" then "Yes" else "No"
- Anonymous2 years ago
Hi rafterse ,
I tested the program _AAndrade offers and it gives you the results you want perfectly. If reply solved your problem, please mark it as the correct solution, and point out if the problem persists.
Best Regards,
Adamk Kong
6 Replies
- Khushidesai0109Skilled Sharer
Hii rafterse
In power query please add a custom column and write this
= if [Column A] = 1 and [Column B] = "Ted" and Text.Start([Column C], 3) = "Red" then "Yes" else "No"If this helps you please give thumbs up and accept it as solution
Thank you!!
- AnonymousNot applicable
- rafterseHelper I
any ideas why i've getting
- Ashish_MathurSuper User
Hi,
Remove the ) before and