cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
Solution Supplier
Solution Supplier

Re: creating custom column from multiple tables with condition

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

Highlighted
Super User IV
Super User IV

Re: creating custom column from multiple tables with condition

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
Highlighted
Solution Supplier
Solution Supplier

Re: creating custom column from multiple tables with condition

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

Highlighted
Super User IV
Super User IV

Re: creating custom column from multiple tables with condition

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

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors