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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
paw1
Helper I
Helper I

Custom Column Creation help

Hi,

Can any one please help me to derive below Type Flag as column from Main Num and Alternate Number based on below logic.

 

if Main Num not present in Alternate Number list then it's parent
if Main Num is present in Alternate Number and also Alternate Number is present in Main Number list then it's Child- Parent
if Main Num is present in Alternate Number and Alternate Number is not present in Main Number list then it's Child

 

paw1_0-1678375375598.png

i have tried below custom column in power query but it's not working for all above three conditions.

 #"Added Custom" = Table.AddColumn(#"Filled Down", "Flag", each if List.Contains(#"Filled Down"[number],[associated number]) then "Parent" else "Child")

 

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User
1 REPLY 1
Ahmedx
Super User
Super User

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.