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
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! 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.

Top Solution Authors