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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

True or False when value from column A is present in Column B

Hello everyone,

I have a column that shows two different informations.

I would like to create a custom column where it will return a True/False if a value in Column A (Component) appears in Column B (Immediate Parent).

mrbuttons07_0-1660809594255.png


Thank you for your help and support!

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You can add a custom column with below code. Notice that you need to modify "Previous Step" accordingly. For example, "Changed Type" is the previous step in my example, so I used it as shown in below image. If you want to add it after "Added Conditional Column" step, you should use "Added Conditional Column" instead. 

List.Contains(#"Previous Step"[Immediate Parent],[Component])

vjingzhang_0-1661151985006.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

5 REPLIES 5
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You can add a custom column with below code. Notice that you need to modify "Previous Step" accordingly. For example, "Changed Type" is the previous step in my example, so I used it as shown in below image. If you want to add it after "Added Conditional Column" step, you should use "Added Conditional Column" instead. 

List.Contains(#"Previous Step"[Immediate Parent],[Component])

vjingzhang_0-1661151985006.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

wdx223_Daniel
Super User
Super User

NewStep=let a=List.Buffer(PreviousStepName[Immediate Parent]) in Table.AddColumn(PreviousStepName,"Custom",each List.Contains(a,[Component]))

Anonymous
Not applicable

Thanks @wdx223_Daniel ,

I receive this error when I use the formula above. Did I miss anything?

mrbuttons07_0-1660871370128.png

 

Vijay_A_Verma
Super User
Super User

Need one help from you. If you can tell us True should appear for which values in the data posted by you, that would be great.

 

👍 It's been a pleasure to help you | Help Hours: 11 AM to 9 PM (UTC+05:30)

How to get your questions answered quickly -- How to provide sample data

Anonymous
Not applicable

Hi @Vijay_A_Verma 

If values from Column Component is present in Column Immediate Parent, then a custom column should return as TRUE. If it is not present then FALSE.

Thanks!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors