Forum Discussion
Anonymous
6 years agoNot applicable
Create a column with Condition.
Hello,
I have a column with Product numbers that are as follows 6500N,76MR1,9ES00A and from these i would derive the Product Type as if the Product Number start with '65' then the Product Type is a,if starts with '76' then B and if starts with '9' then C.How do i do this the easiest way
- Anonymous6 years ago
In the PowerQuery window, you could click on the Add Column tab in the ribbon and choose a conditional column.
2 Replies
- AnonymousNot applicable
The original Code created by Power Query was this:
- = Table.AddColumn(_Customers, "Custom", each Date.Year([BirthDate]), type number)
I simply changed the code directly in the Formula Bar to be like this:
= Table.AddColumn(_Customers, "Age", each 2016 - Date.Year([BirthDate]), type number)
- AnonymousNot applicable
In the PowerQuery window, you could click on the Add Column tab in the ribbon and choose a conditional column.