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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

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

Anonymous
Not applicable

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

 

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
Anonymous
Not applicable

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

 

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.