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
pagliaci
Frequent Visitor

Create a column based on multiple tables

Hello all, 

 

I have one table called SAP - Production (Table1) that should create a new column returning if the checklist for each production line was filled or not. The problem is that I need to look into 4 other tables to return the value from the correponding line. 

So I have LV90 (table2), lv90(table3), lv94(table4), lv88(table5) that are all connected to SAP - Production and they have a column saying that my checklist is done, but I just need 1 column on my Table 1 that compares which line it is and just shows the corresponding checklist.

 

The result I should get on table 1:

pagliaci_0-1633375594244.png

 

1 REPLY 1
smpa01
Super User
Super User

@pagliaci  okay let's suppose you have a master table as following

 

Column1
s1
s2
s3
s4

and three other tables; such as _t1,_t2 and _t3

CATisDone?
s1Yes

 

CATisDone?
s2Yes

 

CATisDone?
s3Yes

 

you can achieve your end goal (havinf two calculated column in master) like following

 

 

isDone? = 
VAR _0 = MAXX ( FILTER ( _t1, _t1[CAT] = EARLIER ( master[Column1] ) ), _t1[isDone?] )   
VAR _1 = MAXX ( FILTER ( _t2, _t2[CAT] = EARLIER ( master[Column1] ) ), _t2[isDone?] ) 
VAR _2 = MAXX ( FILTER ( _t3, _t3[CAT] = EARLIER ( master[Column1] ) ), _t3[isDone?] )
VAR _3 = SWITCH(true(), _0<>BLANK(),_0, _1<>BLANK(), _1,_2<>BLANK(),_2)
RETURN _3

foundWhere? = 
VAR _0 = MAXX ( FILTER ( _t1, _t1[CAT] = EARLIER ( master[Column1] ) ), _t1[isDone?] )   
VAR _1 = MAXX ( FILTER ( _t2, _t2[CAT] = EARLIER ( master[Column1] ) ), _t2[isDone?] ) 
VAR _2 = MAXX ( FILTER ( _t3, _t3[CAT] = EARLIER ( master[Column1] ) ), _t3[isDone?] )
VAR _3 = SWITCH(true(), _0<>BLANK(),"t1", _1<>BLANK(), "t2",_2<>BLANK(),"t3")
RETURN _3

 

smpa01_0-1633379127408.png

 

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

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.