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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.