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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

IF statement between 2 fields from different Data sources

Hi, 

I need to create another column/calculated field - If(id_vendor="UNKN",Rerefence,id_vendor). 

i guess because id_vendor and reference are fields from different data sources, i cant. Do you have any idea how to do this?

 

You can see bellow, how the table looks like. 

Thanks in advance

 

vdichev_0-1611317909372.png

 

2 REPLIES 2
aj1973
Community Champion
Community Champion

Hi @Anonymous 
Normally you are looking for a fourmula like this : 
Column =
var col = CONTAINS(Table1, Table1[id_vendor], "UNKN")
Return
IF(col ,RELATED(Table2[Reference]), id_vendor)
 
However for this formula to work Columns 'Reference' and 'id_vendor' have to be same format(Text)
 
 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

Unfortunately, it does not work. i got an error when using this REATED function. can you help please ?

vdichev_0-1611424115492.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors