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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

Custom Column help

Hello i am having trouble adding a custom column to my query, basically what i want to do is the next, i have 3 tables LAYOUT, CONTRATOS and CCunicos the one I am working on is LAYOUT

 

What i want to do in my new column is to get information from one table or another depending on the value of the column [ID RS] from LAYOUT, if its 39, 41 or 46 i need to get the corresponding [Contrato] from CCunicos  to those ids

if the value is different i need to get the corresponding [CC] from CONTRATOS using [ID RS] and [ID LOC] as Keys 

note:  [ID RS] and [ID LOC] are the original values from LAYOUT

i have tried using the Table.SelectRow function but my code didnt work

 

Leo

5 REPLIES 5
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

the problem is this is confidential info

edhans
Community Champion
Community Champion

Well, you can PM me a link to it vs posting in the forum. I'm genuinly curious as to what the issue is.

 

If you cannot do that, I'm not sure what else I can do.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

done i posted some sample data on the original post

edhans
Community Champion
Community Champion

You want a conditional merge. I responded to your request here about that. Please continue in that thread with some sample data if the code I provided didn't work for you.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.