Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
2 years ago

Power Query - Add column with multiplcation based on criteria from another column

Imagine I have a table that looks like the following:

Col ACol BCol CCol D
BonusData

35

35
BonusData4545
SalaryData5562.59
SalaryData8596.73
HolidayData2525

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

  • 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

    • BA_Pete's avatar
      BA_Pete
      Super 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