Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Custom column with IF and AND statement

Hi, I have 2 columns that look like this

nielsr_0-1604927745063.png

 

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

ID=68 and

Included = TRUE


How do write this in Power Query?

 

2 ACCEPTED SOLUTIONS
mahoneypat
Microsoft Employee
Microsoft Employee

This should work

 

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

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

Icey
Community Support
Community Support

Hi @Anonymous ,

 

You can also create a custom column like so:

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

true.JPG

 

 

Best Regards,

Icey

 

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

 

View solution in original post

3 REPLIES 3
wdx223_Daniel
Super User
Super User

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

[BoatIncludeExcludeItemId] = 68 and [Included]

Icey
Community Support
Community Support

Hi @Anonymous ,

 

You can also create a custom column like so:

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

true.JPG

 

 

Best Regards,

Icey

 

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

 

mahoneypat
Microsoft Employee
Microsoft Employee

This should work

 

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

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors