Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Custom column with IF and AND statement

Hi, I have 2 columns that look like this

 

Now I want to create a custom column that shows "TRUE" when

ID=68 and

Included = TRUE


How do write this in Power Query?

 

  • This should work

     

    = if [BoatIncludeExcludeId] = 68 and [InFulllEquipmentPackage] = true then true else false

     

    Regards,

    Pat

  • Hi Anonymous ,

     

    You can also create a custom column like so:

     = if [ID] = 68 and [Included] then true else false

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

3 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    This should work

     

    = if [BoatIncludeExcludeId] = 68 and [InFulllEquipmentPackage] = true then true else false

     

    Regards,

    Pat

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Community Champion

    clike Add Column ---> Custom Column, and input this formula

    [BoatIncludeExcludeItemId] = 68 and [Included]

  • Icey's avatar
    Icey
    Community Support

    Hi Anonymous ,

     

    You can also create a custom column like so:

     = if [ID] = 68 and [Included] then true else false

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.