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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
Community Champion
Community Champion

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.