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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
prathmeshb27
Frequent Visitor

Create column with related fields from two tables (In Table view)

Hi, Table 1 contains Jobname column with X,Y,Z. I want to create another column Time in this table with related fields from other two tables matching this X,Y,Z. Table 2 contains time of X, Table 3 contains time of Y, Z. 

TABLE 1  Table 2  Table 3  Result Table should be like this
jobnameTime jobnameTime jobname  jobnameTime
X  X9:00 AM Y10:00 PM X9:00 AM
Y     Z11:00 AM Y10:00 PM
Z        Z11:00 AM
2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

Result = UNION('Table 2','Table 3')

View solution in original post

v-yangliu-msft
Community Support
Community Support

Thanks for the reply from lbendlin , please allow me to provide another insight: 
Hi @prathmeshb27 ,

 

Here are the steps you can follow:

1. Create calculated column.

 

Time =
var _table2=
MINX(
    FILTER(ALL('Table2'),'Table2'[jobname]=EARLIER('Table1'[jobname])),[Time])
return
IF(
    _table2=BLANK(),
 MINX(
    FILTER(ALL('Table3'),'Table3'[jobname]=EARLIER('Table1'[jobname])),[Time]) ,_table2
)

 

2. Result:

vyangliumsft_0-1728872171996.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Thanks for the reply from lbendlin , please allow me to provide another insight: 
Hi @prathmeshb27 ,

 

Here are the steps you can follow:

1. Create calculated column.

 

Time =
var _table2=
MINX(
    FILTER(ALL('Table2'),'Table2'[jobname]=EARLIER('Table1'[jobname])),[Time])
return
IF(
    _table2=BLANK(),
 MINX(
    FILTER(ALL('Table3'),'Table3'[jobname]=EARLIER('Table1'[jobname])),[Time]) ,_table2
)

 

2. Result:

vyangliumsft_0-1728872171996.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

lbendlin
Super User
Super User

Result = UNION('Table 2','Table 3')

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.