Forum Discussion
Syndicate_Admin
2 years agoAdministrator
Power Query - Add column with multiplcation based on criteria from another column
Imagine I have a table that looks like the following:
| Col A | Col B | Col C | Col D |
| Bonus | Data | 35 | 35 |
| Bonus | Data | 45 | 45 |
| Salary | Data | 55 | 62.59 |
| Salary | Data | 85 | 96.73 |
| Holiday | Data | 25 | 25 |
I would like to add a column (Col D) which performs a multiplication of Col C (* 1.138), but only if Col A contains a specific word, for example "salary", if it doesn't then the total should remain the same. Is this possible please? Thank you in advance.
3 Replies
- BA_PeteSuper User
Hi,
You should be able to add a custom column like this:
if [Col A] = "Salary" then [Col C] * 1.138 else [Col C]Pete
- Syndicate_AdminAdministrator
Thank you so much Pete.
- BA_PeteSuper User
No problem, happy to help.
If this has solved the issue, please mark the correct answer as the solution, and feel free to give a thumbs-up on any posts that help you 👍
Pete