The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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.
Thank you so much Pete.
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
Proud to be a Datanaut!
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
Proud to be a Datanaut!