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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
johankent30
Helper I
Helper I

Custom lookup column in query editor (M not DAX)

I have the following tables. I want to create a column in the query editor (M not DAX) that will look at Table B and if the Request has a "Yes" for any task, then put a "Yes" in Table A. If not put a "No". Any thoughts? Thanks!

 

 

 

IFS.JPG

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @johankent30 ,

 

You need to add some additional step to table A:

  • On the last step Table B right click and select Insert Step After
  • Add the following code in the formula Bar:
    • = #"Table B"
  • The previous code references table B on your data
  • Group the column by the Request and Maximum link value
  • This should give you a table with 2 columns
  • Replace all values that are no Yes by No
  • Do a merge between the Last step before you reference table B and the replacement of values by no
  • Expand the column that was created on the previous step

Check PBIX file attach.

 

You can also create a custom function following this blog post.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @johankent30 ,

 

You need to add some additional step to table A:

  • On the last step Table B right click and select Insert Step After
  • Add the following code in the formula Bar:
    • = #"Table B"
  • The previous code references table B on your data
  • Group the column by the Request and Maximum link value
  • This should give you a table with 2 columns
  • Replace all values that are no Yes by No
  • Do a merge between the Last step before you reference table B and the replacement of values by no
  • Expand the column that was created on the previous step

Check PBIX file attach.

 

You can also create a custom function following this blog post.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Awesome, thanks!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors