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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lakshmikanthk
New Member

creating custom column from multiple tables with condition

I am trying to create custom column, trying to populate vlaues from two diffrent tables based on condition.

 

Table 1   to Table 2  relations ship created(active) on workflowid

 

Table     to Table 3  relation ship created but not active on workflow id

 

Table 1

Workflowid MonitorNew Colum
1true  
2FALSE 
3true  
4FALSE 

 

Table 2

 

Workflowid MP ID
112
314

 

Table 3

 

Workflowid MP ID
213
415

 

Expecting out put 

 

Workflowid MP IDNew Colum
1true 12
2FALSE13
3true 14
4FALSE15
2 ACCEPTED SOLUTIONS
dilumd
Impactful Individual
Impactful Individual

how about appending your table 2 and 3 together first and then do a relation between appended table and table no1?

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

 

The best solution has been suggested to you by @dilumd.  If you do not wish to follow that solution, here is a calculated formula you can write in Table1

 

=if(ISBLANK(RELATED(Table2[MD ID])),LOOKUPVALUE(Table3[MD ID],Table3[Workflowid],[Workflowid]),RELATED(Table2[MD ID]))

For this formula to work, there does not need to be any relationship between Table1 and Table3 - the LOOKUPVALUE() function does not require any relationship - active or not.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

The best solution has been suggested to you by @dilumd.  If you do not wish to follow that solution, here is a calculated formula you can write in Table1

 

=if(ISBLANK(RELATED(Table2[MD ID])),LOOKUPVALUE(Table3[MD ID],Table3[Workflowid],[Workflowid]),RELATED(Table2[MD ID]))

For this formula to work, there does not need to be any relationship between Table1 and Table3 - the LOOKUPVALUE() function does not require any relationship - active or not.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
dilumd
Impactful Individual
Impactful Individual

how about appending your table 2 and 3 together first and then do a relation between appended table and table no1?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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